@spscommerce/ds-react 8.26.4 → 8.26.6
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.js +1021 -1021
- package/lib/index.umd.cjs +32 -32
- package/package.json +12 -12
package/lib/index.umd.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(_,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):(_=typeof globalThis<"u"?globalThis:_||self,x(_.DSReact={},_.React,_.utils,_.moment$4,_.dsShared,_.ReactDOM,_.dsColors,_.tabs,_.collections,_.illustrations))})(this,function(_,x,v,Je,W,bo,Oa,Ih,or,Wl){"use strict";var Jx=Object.defineProperty;var Nh=_=>{throw TypeError(_)};var Zx=(_,x,v)=>x in _?Jx(_,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[x]=v;var Yt=(_,x,v)=>Zx(_,typeof x!="symbol"?x+"":x,v),kh=(_,x,v)=>x.has(_)||Nh("Cannot "+v);var rr=(_,x,v)=>(kh(_,x,"read from private field"),v?v.call(_):x.get(_)),La=(_,x,v)=>x.has(_)?Nh("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(_):x.set(_,v),hn=(_,x,v,Je)=>(kh(_,x,"write to private field"),Je?Je.call(_,v):x.set(_,v),v);var Qn,In,xn;function Gl(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=Gl(x),ar=Gl(Je);function Yl(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=Yl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function G(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Yl(e))&&(r&&(r+=" "),r+=t);return r}const xh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ft=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=xh[n[e]&63];return t};function Sn(e){return x.useRef(e||ft())}function bt(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 Pa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mh="[object Object]";function _h(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function Lh(e,t){return function(n){return e(t(n))}}var Oh=Function.prototype,Ul=Object.prototype,zl=Oh.toString,Ph=Ul.hasOwnProperty,Rh=zl.call(Object),Bh=Ul.toString,Ah=Lh(Object.getPrototypeOf,Object);function Fh(e){return!!e&&typeof e=="object"}function Vh(e){if(!Fh(e)||Bh.call(e)!=Mh||_h(e))return!1;var t=Ah(e);if(t===null)return!0;var n=Ph.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&zl.call(n)==Rh}var $h=Vh;const jl=Pa($h),Et=new Set,sr=new Set,zt=new Set,vo=new Set;function ql(e){Et.has(e)||zt.has(e)||vo.has(e)||sr.add(e)}function Jl(e){Et.has(e)||zt.has(e)||sr.has(e)||vo.add(e)}const tt=ar.default||ar,ir="MM/DD/YYYY",Kh="MM/DD/YYYY hh:mm A",Hh="MM/DD/YYYY HH:mm",Wh="hh:mm A",Gh="HH:mm",Yh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,_r=Symbol("Date Parse Error");function lr(e){return tt.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const te=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=tt(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Yh.exec(e);if(n){const[,r,a,s]=n;return Object.freeze({year:Number(s),month:Number(r),date:Number(a)})}}return Object.freeze({[_r]:!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=tt(e,t,!0):n=tt(e):tt.isMoment(e)?n=e:n=te.toMoment(e),n!==null&&tt.isMoment(n)&&n.isValid()?n:Object.freeze({[_r]:!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=te.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(a=>te.createFrom(a,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>te.createFrom(n))},isValid(e){var t;return e?tt.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=te.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return te.isValid(e)?e:null},toMoment(e){return e?tt.isMoment(e)?e:tt({...e,month:e.month-1}):null},toString(e,t){const n=te.toMoment(e);return n&&n.isValid()?n.format(t||ir):""},toStringRange(e,t){if(!e)return"";const n=te.getRangeSeparator(t);return e.slice(0,2).map(r=>te.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&tt.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Gh}`):e.format(`${n} ${Wh}`):t?e.format(Hh):e.format(Kh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=te.getRangeSeparator(n);return e.map(a=>te.toDateTimeString(a,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:lr(e)>lr(t)},isBefore(e,t){return!e||!t?null:lr(e)<lr(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=lr(e),[a,s]=t.map(lr);return a&&s&&(n&&r>=a&&r<=s||!n&&r>a&&r<s)},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=tt(),r=n.clone().subtract(tt.duration(e.definition));return[te.createFrom(r,t),te.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();let t;e.definition==="P0D"?t=tt().startOf("day"):t=tt().subtract(tt.duration(e.definition));const n=tt().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n,r=!1){let a="";t?a=r?"23:59":"00:00":a=r?"11:59":"12:00";const s=r?"PM":"AM";return e&&tt.isMoment(e)&&e.isValid()?te.toDateTimeString(e,t,n).split(" "):["",a,t?void 0:s]},getCurrentMoment(){return tt()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",a=n[1]||"0",s=Number.isNaN(Number(r))?NaN:parseInt(r,10),l=Number.isNaN(Number(a))?NaN:parseInt(a,10),c=n.length<=2&&r.length<=2&&a.length<=2;return t?c&&s>=0&&s<=23&&l>=0&&l<=59:c&&(!Number.isNaN(s)&&r.length===1||s>=1)&&s<=12&&l>=0&&l<=59},padIncompleteTimeString(e,t=!1){if(!e)return"";const n=e.split(":"),r=parseInt(n[0]||"0",10),a=parseInt(n[1]||"0",10);if(t){const s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}else{const s=r===0?"12":r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}}}),Ra=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],Ba=["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 yo=ir;function Zl(e){yo=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[_r])return{dateFormat:yo};if(!te.isValid(t))return{dateValidity:!0}}return null};Et.add("dateFormat"),Et.add("dateValidity");const Xl=function(t){if(Array.isArray(t)){const n=Lr(t);if(n)return n;if(t&&te.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};Et.add("dateRangeOrder");const Ql=function({minDate:t,maxDate:n}){function r(a){const s=te.isBefore(a,t),l=te.isAfter(a,n),c={minExceeded:s?te.toString(t,yo):null,maxExceeded:l?te.toString(n,yo):null};return s||l?{dateConstraint:c}:null}return function(s){if(!s)return null;if(Array.isArray(s)){const l=r(s[0]),c=r(s[1]);return l||c}return s.hasOwnProperty("year")?r(s):null}};Et.add("dateConstraint");const Uh=Object.freeze(Object.defineProperty({__proto__:null,date:Lr,dateConstraint:Ql,dateRange:Xl,setDateFormat:Zl},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 zh=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>en(r,n)};Et.add("min");const jh=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>en(r,n)};sr.add("max");const qh=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};sr.add("required");const Jh=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>en(r,n)};Et.add("minLength");const Zh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};Et.add("minLengthArray");const Xh=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 Qh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};Et.add("maxLengthArray");const eS=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(a){return n.test(a)?null:{pattern:t}}return a=>en(a,r)};Et.add("pattern");const tS=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return en(e,t)};zt.add("alpha");const nS=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return en(e,t)};zt.add("numeric");const rS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return en(e,t)};zt.add("positiveOrNegativeNumber");const oS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return en(e,t)};zt.add("nonNumeric");const To=Object.freeze({...Uh,min:zh,max:jh,required:qh,minLength:Jh,minLengthArray:Zh,maxLength:Xh,maxLengthArray:Qh,pattern:eS,alpha:tS,numeric:nS,nonNumeric:oS,positiveOrNegativeNumber:rS,OnBlurErrorKeys:Et});function Eo(e,t=[]){const n=t.reduce((r,a)=>Object.assign(r,a(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 aS(e,t={},n=[]){for(const[r,a]of Object.entries(t))a===0?ql(r):a===2&&Jl(r);return o.useCallback(e,n)}class Rn{constructor(t,n){Yt(this,"validators",[]);La(this,Qn,null);La(this,In,null);La(this,xn,null);Yt(this,"preventativeErrors",[]);Yt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return rr(this,Qn)===null&&rr(this,In)===null&&rr(this,xn)===null?null:{...rr(this,Qn)??{},...rr(this,In)??{},...rr(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 a=Eo(t,this.validators);let s={onSubmit:{},onChange:{},onBlur:{}};a&&(s=Object.keys(a).reduce((l,c)=>(vo.has(c)?l.onSubmit[c]=a[c]:sr.has(c)?l.onChange[c]=a[c]:l.onBlur[c]=a[c],l),s)),(typeof n>"u"||n===jt.ON_CHANGE)&&hn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),(typeof n>"u"||n===jt.ON_BLUR)&&hn(this,xn,Object.keys(s.onBlur).length===0?null:s.onBlur),(typeof n>"u"||n===jt.ON_SUBMIT)&&(hn(this,Qn,Object.keys(s.onSubmit).length===0?null:s.onSubmit),hn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),hn(this,xn,Object.keys(s.onBlur).length===0?null:s.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(hn(this,Qn,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(To.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}Qn=new WeakMap,In=new WeakMap,xn=new WeakMap;class Or extends Rn{constructor(){super(...arguments);Yt(this,"id",ft());Yt(this,"focused",!1);Yt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=Eo(n,this.validators);if(r&&Object.keys(r).filter(s=>zt.has(s)).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 Bn extends Or{constructor(n,r,a){super(a?r:n,a||r);Yt(this,"fields");a&&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 wo(n,[...this.path,r],this.update)}rollup(n){return Object.keys(this.fields).reduce((r,a)=>r&&(!this.fields[a][n]||this.fields[a][n]()),!0)}}class ec extends Bn{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class tc extends Bn{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function wo(e,t,n){return e instanceof Rn?(e.path=t,e.update=n,e):Array.isArray(e)?new tc(e,t,n):jl(e)?new ec(e,t,n):new Or(t,n)}function Pr(e,t){return t.length===0||!e?e:Pr(e.fields[t[0]],t.slice(1,t.length))}function Aa(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(a=>e.fields[a]);return t.length===0?r:r.reduce((a,s)=>[...a,...Aa(s,t)],[])}return Aa(e.fields[n],t)}function Fa(e,t,n){for(const r of Object.keys(t)){const a=t[r];for(const s of Aa(e,r.split(".")))s&&a&&n(s,a)}}function Co(e,t,n,r=!1,a=!1){Fa(t,n,(s,l)=>{s.validators=typeof l=="function"?l(e):l,r&&s.validate(v.getPath(e,s.path),void 0,a)})}function Va(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,a)=>a===Number(n)?Va(r,t):r):jl(e)?Object.keys(e).reduce((r,a)=>Object.assign(r,{[a]:a===n?Va(e[a],t):e[a]}),{}):e}function sS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function nc(e,t={}){sS(e);const[,n]=x.useState({}),r=x.useRef(!1);r.current=!1;const a=x.useRef(t),s=x.useCallback(h=>{var T,C;const S=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const E=Pr(S.formMeta,h.path);if(E){E.focused=!1;const N=v.getPath(S.formValue,h.path);E.validate(N,jt.ON_BLUR)}}else if(h.newValidators){if(a.current){const E=h.path.join(".");a.current={...a.current,[E]:h.newValidators},Co(S.formValue,S.formMeta,a.current,!0)}}else if(h.markAsSubmitted){const E=Pr(S.formMeta,h.path);if(E){E.submitted=!0;const N=v.getPath(S.formValue,h.path);E.validate(N,jt.ON_SUBMIT)}}else y=Va(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&&(a.current={...a.current,...h.updateFormOptions.validators},Co(S.formValue,S.formMeta,a.current,((C=h.updateFormOptions)==null?void 0:C.runValidators)??!0)),y){S.formMeta.submitted=!1,v.deepFreeze(y);const E=v.diff(S.formValue,y);for(const{type:M,key:I,parentPath:k,objects:[,V]}of E){const R=Pr(S.formMeta,k);if(typeof I!="symbol"&&R){let w;switch(M){case v.DiffChange.ADDITION:R.fields[I]=wo(V[I],[...k,I],c);break;case v.DiffChange.DELETION:Array.isArray(R.fields)?R.fields[I]=void 0:delete R.fields[I];break;case v.DiffChange.ALTERATION:w=wo(V[I],[...k,I],c),(w instanceof Bn&&!(R.fields[I]instanceof Bn)||!(w instanceof Bn)&&R.fields[I]instanceof Bn)&&(w.pristine=!1,R.fields[I]=w);break}}}const N=new Set;if(E.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=Pr(S.formMeta,M);Array.isArray(I.fields)&&(I.fields=I.fields.filter(k=>k!==void 0))}),a.current){Co(y,S.formMeta,a.current);const M=new Set;t&&Fa(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:[,R]}of E)if(typeof k!="symbol"){let w=S.formMeta,P=y;if(w){for(const O of V)w=w.fields[O],P=P[O],M.has(w)||w.validate(P,jt.ON_CHANGE);if(I===v.DiffChange.ADDITION||I===v.DiffChange.ALTERATION){const O=w.fields[k];if(!M.has(O)&&(w.fields[k].validate(R[k],jt.ON_CHANGE),I===v.DiffChange.ADDITION&&O.fields))for(const[$,J]of Object.entries(O.fields))J.validate(R[k][$],jt.ON_CHANGE)}}}}}u.current={...S,formValue:y||S.formValue},r.current||n({})},[]),l=x.useCallback((h,S)=>{h||S?s({value:h,updateFormOptions:S}):s()},[s]),c=x.useCallback((h,S,y=!1,T,C=!1)=>{h?s({path:h,value:S,markAsBlurred:y,newValidators:T,markAsSubmitted:C}):l()},[s,l]),p=x.useMemo(()=>{v.deepFreeze(e);const h=wo(e,[],c);return t&&Co(e,h,t,!1,!0),h},[]),m=x.useCallback(()=>(u.current.formMeta.markAsDirty(),a.current&&Fa(u.current.formMeta,a.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:a,formControl:s,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 Or&&l.markAsFocused()}function T(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsBlurred()}const C=G("sps-form-group",(s&&s.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(s&&!s.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function E(N){a&&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:C,ref:t,tabIndex:-1,onClick:E,onFocus:y,onBlur:T},r)});Object.assign(at,{displayName:"SpsFormComponentWrapper"});function rc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function oc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function $a(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return oc(n.overflowY,t)||oc(n.overflowX,t)||function(r){var a=function(s){if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!a&&(a.clientHeight<r.scrollHeight||a.clientWidth<r.scrollWidth)}(e)}return!1}function Do(e,t,n,r,a,s,l,c){return s<e&&l>t||s>e&&l<t?0:s<=e&&c<=n||l>=t&&c>=n?s-e-r:l>t&&c<n||s<e&&c>n?l-t+a:0}var ac=function(e,t){var n=window,r=t.scrollMode,a=t.block,s=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(ke){return ke!==l};if(!rc(e))throw new TypeError("Invalid target");for(var m,f,u=document.scrollingElement||document.documentElement,h=[],S=e;rc(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&&$a(S)&&!$a(document.documentElement)||S!=null&&$a(S,c)&&h.push(S)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,T=n.visualViewport?n.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,N=e.getBoundingClientRect(),M=N.height,I=N.width,k=N.top,V=N.right,R=N.bottom,w=N.left,P=a==="start"||a==="nearest"?k:a==="end"?R:k+M/2,O=s==="center"?w+I/2:s==="end"?V:w,$=[],J=0;J<h.length;J++){var L=h[J],Z=L.getBoundingClientRect(),A=Z.height,ne=Z.width,Y=Z.top,U=Z.right,ae=Z.bottom,H=Z.left;if(r==="if-needed"&&k>=0&&w>=0&&R<=T&&V<=y&&k>=Y&&R<=ae&&w>=H&&V<=U)return $;var q=getComputedStyle(L),re=parseInt(q.borderLeftWidth,10),oe=parseInt(q.borderTopWidth,10),j=parseInt(q.borderRightWidth,10),B=parseInt(q.borderBottomWidth,10),z=0,Q=0,ee="offsetWidth"in L?L.offsetWidth-L.clientWidth-re-j:0,de="offsetHeight"in L?L.offsetHeight-L.clientHeight-oe-B:0,ie="offsetWidth"in L?L.offsetWidth===0?0:ne/L.offsetWidth:0,le="offsetHeight"in L?L.offsetHeight===0?0:A/L.offsetHeight:0;if(u===L)z=a==="start"?P:a==="end"?P-T:a==="nearest"?Do(E,E+T,T,oe,B,E+P,E+P+M,M):P-T/2,Q=s==="start"?O:s==="center"?O-y/2:s==="end"?O-y:Do(C,C+y,y,re,j,C+O,C+O+I,I),z=Math.max(0,z+E),Q=Math.max(0,Q+C);else{z=a==="start"?P-Y-oe:a==="end"?P-ae+B+de:a==="nearest"?Do(Y,ae,A,oe,B+de,P,P+M,M):P-(Y+A/2)+de/2,Q=s==="start"?O-H-re:s==="center"?O-(H+ne/2)+ee/2:s==="end"?O-U+j+ee:Do(H,U,ne,re,j+ee,O,O+I,I);var se=L.scrollLeft,Ne=L.scrollTop;P+=Ne-(z=Math.max(0,Math.min(Ne+z/le,L.scrollHeight-A/le+de))),O+=se-(Q=Math.max(0,Math.min(se+Q/ie,L.scrollWidth-ne/ie+ee)))}$.push({el:L,top:z,left:Q})}return $};function sc(e){return e===Object(e)&&Object.keys(e).length!==0}function iS(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var a=r.el,s=r.top,l=r.left;a.scroll&&n?a.scroll({top:s,left:l,behavior:t}):(a.scrollTop=s,a.scrollLeft=l)})}function lS(e){return e===!1?{block:"end",inline:"nearest"}:sc(e)?e:{block:"start",inline:"nearest"}}function No(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(sc(t)&&typeof t.behavior=="function")return t.behavior(n?ac(e,t):[]);if(n){var r=lS(t);return iS(ac(e,r),r.behavior)}}const Ka=Object.freeze(Object.defineProperty({__proto__:null,default:No},Symbol.toStringTag,{value:"Module"})),He=o.createContext(W.noI18nI18n),cS={alt:"string",size:"SpinnerSize",title:"string"};function Ha(e){const{alt:t,className:n,size:r=W.SpinnerSize.MEDIUM,"data-testid":a,title:s,unsafelyReplaceClassName:l,...c}=e,{t:p}=o.useContext(He),m=t||s||p("design-system:spinner.defaultAltText",{defaultValue:"Loading..."}),f=G(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:f,"data-testid":a,title:m,...c})}Object.assign(Ha,{props:cS,displayName:"SpsSpinner"});const dS=60;function ko(e){return typeof e>"u"?"inherit":`${e}px`}function Wa(e){switch(e){case W.Position.TOP_LEFT:return W.Position.BOTTOM_LEFT;case W.Position.TOP_MIDDLE:return W.Position.BOTTOM_MIDDLE;case W.Position.TOP_RIGHT:return W.Position.BOTTOM_RIGHT;case W.Position.RIGHT_TOP:return W.Position.LEFT_TOP;case W.Position.RIGHT_MIDDLE:return W.Position.LEFT_MIDDLE;case W.Position.RIGHT_BOTTOM:return W.Position.LEFT_BOTTOM;case W.Position.BOTTOM_RIGHT:return W.Position.TOP_RIGHT;case W.Position.BOTTOM_MIDDLE:return W.Position.TOP_MIDDLE;case W.Position.BOTTOM_LEFT:return W.Position.TOP_LEFT;case W.Position.LEFT_BOTTOM:return W.Position.RIGHT_BOTTOM;case W.Position.LEFT_MIDDLE:return W.Position.RIGHT_MIDDLE;case W.Position.LEFT_TOP:return W.Position.RIGHT_TOP}}function pS(e,t,n,r,a,s,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,C,E,N;switch(S){case"top":E=t.height-n.top-f-s[0];break;case"left":C=t.width-n.left-h-s[0];break;case"right":N=n.right+h-s[0];break;case"bottom":T=n.bottom+f-s[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":N=n.left+h+s[1];break;case"top":T=n.top+f+s[1];break;case"middle":S==="top"||S==="bottom"?N=n.left+h+n.width/2-a/2+s[1]:(S==="left"||S==="right")&&(T=n.top+f+n.height/2-r.height/2+s[1]);break;case"bottom":E=t.height-n.bottom-f+s[1];break;case"right":C=t.width-n.right-h+s[1];break;default:throw new Error(`Invalid position ${e}`)}return[T,C,E,N]}function An(e,t,n,{altPosition:r,setMinWidth:a=!1,setWidth:s=!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,C]=n.split(" ");let E=n;if(r&&(T==="top"&&f.top-m.height<dS||T==="right"&&f.right+m.width>h||T==="bottom"&&f.bottom+m.height>u||T==="left"&&f.left-m.width<0)&&(E=r),C==="left"&&f.left+m.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(T){case"bottom":E=W.Position.BOTTOM_RIGHT;break;case"top":E=W.Position.TOP_RIGHT;break}const N=a?Math.max(f.width,m.width):m.width,M=s?f.width:N,[I,k,V,R]=pS(E,y,f,m,M,p,l,c),w={top:ko(I),right:ko(k),bottom:ko(V),left:ko(R)};return c&&(w.position="fixed",w.zIndex=W.ZStratum.BAR),a&&(w.minWidth=`${f.width}px`),s&&(w.width=`${f.width}px`),[w,E===r]}return[{},!1]}const kt=x.createContext(null);function cr(e,t=[]){const n=x.useContext(kt);return x.useMemo(()=>r=>{const s=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=s.lastElementChild;for(;c&&c!==s.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)s.contains(l)||s.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);s.appendChild(l)}return bo.createPortal(r,l)},[n])}const Ga=["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","1","2","3","4","5","6","7","8","9","0"];async function ic(e,t,n,r,a,s){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),s.current=c?l:null;const m=c?await l||[]:l||[];if(c&&s.current!==l)return;let f=Array.from(m).filter(Boolean).map(u=>new W.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&f.unshift(new W.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),a(f.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function uS(e,t,n){const[r,a]=o.useState(Object.freeze([])),[s,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(ic,typeof e.searchDebounce<"u"?e.searchDebounce:500):ic,[p.current,e.disabledOptions]);return o.useEffect(()=>{m(e,t,n,a,l,c)},[p.current,t.value,e.disabledOptions]),[r,s]}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 mS(e,t){return{...e,...t}}function qt(e){return x.useReducer(mS,e)}function fS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:a="Search…",searchInputRef:s}){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:""}),s!=null&&s.current&&(n&&n(new gn(s.current)),s.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:a,ref:s,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 hS=No||Ka,SS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"];function gS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function lc(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e!=null&&e.find(r=>{var a;return r[t]&&r[t]===((a=n==null?void 0:n.value)==null?void 0:a[t])})):!1}const Rr=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:a,options:s,tall:l,textKey:c,valueKey:p,zeroState:m,hideInlineSearch:f,onSearchChange:u,search:h,searchDebounce:S,searchPlaceholder:y,onSpecialActionSelect:T,attachTo:C,className:E,conformWidth:N,id:M,ignoreWidthStyles:I,isOpen:k,keepOpen:V,keyDown:R,nullOption:w,onOptionListChanged:P,onOptionSelected:O,onPositionFlip:$,onSelfToggle:J,optionRole:L,positionOverride:Z,selectedOption:A,specialAction:ne,unsafelyReplaceClassName:Y,loading:U,filterByTextAndCaptionKey:ae,maxHeightPx:H,maxHeightRem:q,disableOptionsMemoization:re,disableDefaultOptionsFiltering:oe,"data-testid":j,typeaheadEvent:B,...z}=e,Q=o.useMemo(()=>ne?new W.SpsOptionListOption(ne,{textKey:"label",captionKey:"caption"}):null,[ne]),[ee,de]=o.useState(-1),[ie,le]=o.useState(k),se=t||o.useRef(null),Ne=o.useRef(null),ke=o.useRef(null),it=cr("sps-option-list-portal"),lt=o.useContext(kt),[ut,ct]=Z||[W.Position.BOTTOM_LEFT,W.Position.TOP_LEFT],[[Pt,je],fe]=o.useState([{},!1]),Fe=o.useRef(null),[ve,Le,Qe]=fS({...e,searchInputRef:Fe}),[we,Ht]=uS(e,Le,Qe);o.useEffect(()=>{B&&pt(B)},[B]),o.useEffect(()=>{fe(ie?An(se,C,ut,{altPosition:ct,setMinWidth:!I,setWidth:!I&&N,...lt}):[{},!1])},[ie,ut,ct,we]),o.useEffect(()=>{let be;return ie&&(be=()=>{ie&&fe(An(se,C,ut,{altPosition:ct,setMinWidth:!I,setWidth:!I&&N,...lt}))},document.addEventListener("scroll",be)),()=>{be&&document.removeEventListener("scroll",be)}},[ie]),o.useEffect(()=>{de(-1)},[Le]);const Mn=G(Y||"sps-option-list","z-stratum-dropdown",ie&&"sps-option-list--open",Le.isAsync&&"sps-option-list--searchable",je&&"sps-option-list--opens-upward",ne&&ne.label&&"sps-option-list--has-special-action",E),ue=G(Y||"sps-option-list__options",l&&"sps-option-list__options--tall"),Se=o.useCallback(()=>{ie||(le(!0),Fe.current&&Fe.current.focus(),de(-1),J&&J(!0))},[ie,J]),Oe=o.useCallback(()=>{ie&&(le(!1),de(-1),J&&J(!1))},[ie,J]),Ze=o.useCallback((be,Te)=>{Te||be&&!be.disabled&&(typeof be.value=="function"?(be.value(),T&&T()):typeof O=="function"&&O(be.value),V||Oe())},[O,Oe]),Ie=o.useCallback((be,Te,Xe)=>{be.stopPropagation(),Ze(Te,Xe)},[Ze]),dt=o.useRef(a||[]);dt.current=a||[];const Tt=o.useCallback(be=>{switch(be.key){case"Tab":case"Escape":Oe();break;case"Enter":if(ee>-1){const Te=we[ee]||Q;be.preventDefault();const Xe=!!Te&&lc(dt.current,r||"",Te);!Xe&&Te&&typeof O=="function"&&typeof Te.value=="function"?Te.value():Te&&Ze(Te,Xe)}break;case"Up":case"ArrowUp":{let Te=ee;je?ee<=-1?Te=we.length-1:ee===0?ne&&(Te=we.length):ee<we.length&&(Te=ee-1):ee>-1&&(Te=ee-1),Te!==ee&&(be.preventDefault(),de(Te));break}case"Down":case"ArrowDown":{Se();let Te=ee;je?ee!==-1&&(ee>=we.length?Te=0:ee===we.length-1?Te=-1:Te=ee+1):ee<we.length-1+ +!!ne&&(Te=ee+1),Te!==ee&&(be.preventDefault(),de(Te));break}default:Se()}},[Oe,Se,ee,Ze,O,je,we]),Ae=o.useCallback(be=>{Se();const Te=we.findIndex(Xe=>{if(Xe.textKey){const Rt=Xe.textKey;return Xe.value[Rt].toLowerCase().charAt([0])===be.key.toLocaleLowerCase()}return Xe.value.toString().toLowerCase().charAt([0])===be.key.toLocaleLowerCase()});Te>-1&&de(Te)},[we]),pt=o.useCallback(be=>{be&&(SS.includes(be.key)?Tt(be):Ga.includes(be.key)&&!f&&Ae(be))},[Oe,Se,ee,Ze,O,je,we]);o.useEffect(()=>{if(lt!==null&&document.getElementsByClassName("sps-modal__body").length>0){const be=()=>{J&&J(!1)},Te=document.getElementsByClassName("sps-modal__body")[0];return Te.addEventListener("scroll",be),()=>{Te.removeEventListener("scroll",be)}}},[]),o.useEffect(()=>{ie&&ke.current&&hS(ke.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[ee,ie]),o.useEffect(()=>{le(k),k?Fe.current&&Fe.current.focus():de(-1)},[k]),o.useEffect(()=>{R&&pt(R)},[R]),o.useEffect(()=>{!ie&&Ne.current&&(Qe({value:""}),Ne.current.scrollTop=0),ie&&$&&$(je)},[ie]);const _n=H?H/16:q,Xt=_n?{maxHeight:`${_n}rem`}:{};function va(be,Te){return Te?o.createElement(o.Fragment,null,be.split(Te).map((Xe,Rt)=>Te.test(Xe)?o.createElement("u",{key:Rt},Xe):o.createElement(o.Fragment,{key:Rt},Xe))):o.createElement(o.Fragment,null,be)}return it(o.createElement("div",{className:Mn,id:M,"aria-activedescendant":ee>-1?`${M}-option-${ee}`:"",tabIndex:-1,ref:se,style:Pt,onMouseLeave:()=>de(-1),"data-testid":j,...z},ve,o.createElement("div",{className:ue,ref:Ne,"data-testid":`${j}-options`,style:Xt},!U&&!Le.pending&&m&&we.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},m),(U||Le.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Ha,null)),!U&&!Le.pending&&we.map((be,Te)=>{const Xe=`${M}-option-${Te}`,Rt=gS(be.value,A,r),me=lc(dt.current,r||"",be);return o.createElement("a",{key:Xe,id:Xe,role:L,"aria-selected":Rt,href:be.href,className:G("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",(Rt||me)&&"sps-option-list__option--selected",ee===Te&&"sps-option-list__option--highlighted"),onClick:wl=>Ie(wl,be,me),onMouseOver:()=>de(Te),tabIndex:-1,ref:ee===Te?ke:null,"data-testid":`${j}-option-${Te}`},be.value&&be.value.icon&&o.createElement("i",{className:G("sps-icon","sps-option-list__option-icon",`sps-icon-${String(be.value.icon)}`)}),(!be.value||!be.value.icon&&Ht)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,va(be.text,Le.replacementPattern)),be.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,va(be.caption,Le.replacementPattern))))})),Q&&(ne==null?void 0:ne.label)&&o.createElement("a",{className:G("sps-option-list__option","sps-option-list__special-action",ee===we.length&&"sps-option-list__option--highlighted",ne.disabled&&"sps-option-list__special-action--disabled"),href:Q.href,target:Q.href&&ne.newTab?"_blank":"_self",onClick:be=>Ie(be,Q),onMouseOver:()=>de(we.length),"data-testid":`${j}-special-action`},ne.icon&&o.createElement("i",{className:G("sps-icon","sps-option-list__option-icon",`sps-icon-${String(ne.icon)}`)}),!ne.icon&&Ht&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,ne.label))))});Object.assign(Rr,{displayName:"SpsOptionList"});function bS(e,t,n=[]){return o.useMemo(()=>{function r(a){return o.createElement(e,{...a,...t},a.children)}return r},n)}function vt(e){return typeof e=="function"?e():e}const cc=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(cc,{elements:t.slice(1)},e))},dc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(cc,{elements:t},e))},vS=function({children:e,className:t,...n}){return o.createElement(dc,{className:`sps-app ${t}`,...n},e)};function It(e=[],t=[]){const n=Array.isArray(e)?v.flatten(e):[e],r=t.map(s=>Array.isArray(s)?s:[s]),a=new Array(r.length+1).fill(null).map(()=>[]);for(const s of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:m={}}of r[c])if(s.type===p&&Object.keys(m).every(u=>m[u]===s.props[u])){l=!0,a[c].push(s);break}l||a[a.length-1].push(s)}return a}function pc(e,t,n){const r=Object.entries(t).filter(([,s])=>typeof s!="string"&&s.deprecated).map(([s])=>s),a=r.map(s=>n[s]);o.useEffect(()=>{a.find(s=>typeof s<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},a)}function Ya(e,t){const n=x.useRef(!1);x.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Ua(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 uc(e,t,n){return function(a){var s,l;!((s=e.current)!=null&&s.contains(a.target))&&!((l=t.current)!=null&&l.contains(a.target))&&n()}}function dr(e,t,n){const r=o.useRef(!1),[a,s]=o.useState(!1),l=o.useCallback(()=>{r.current?r.current=!1:s(!0)},[]),c=o.useCallback((p=!1)=>{s(!1),r.current=p,n&&n()},[]);return Ua("mousedown",uc,[e,t,c]),Ua("pointerdown",uc,[e,t,c]),{showPopup:a,doShowPopup:l,doHidePopup:c}}const mc=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),a=c=>r(c,"overflow")+r(c,"overflow-y"),s=c=>t.test(a(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(s(p[m]))return p[m];return null})(e)};let za=0;function Io({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,a;if(e&&t.current){za+=1,n=mc(t.current)||document.body,r=n===document.body?window.innerWidth-document.documentElement.clientWidth:n.offsetWidth-n.clientWidth,n.style.overflow="hidden";const s=window.getComputedStyle(n).paddingRight;if(n.style.paddingRight=s&&s!=="0px"?`calc(${s} + ${r}px)`:`${r}px`,n===document.body)if(a=document.getElementsByClassName("sps-navbar-container").item(0),a&&window.getComputedStyle(a).position==="fixed"){const l=window.getComputedStyle(a).paddingRight;a.style.paddingRight=l&&l!=="0px"?`calc(${l} + ${r}px)`:`${r}px`}else{const l=document.getElementsByTagName("nav").item(0);if(a=l==null?void 0:l.parentElement,a&&window.getComputedStyle(a).position==="fixed"){const c=window.getComputedStyle(a).paddingRight;a.style.paddingRight=c&&c!=="0px"?`calc(${c} + ${r}px)`:`${r}px`}}}return()=>{n&&(za-=1,za===0&&(n.style.overflow=null,n.style.paddingRight=null,a&&(a.style.paddingRight=null)))}},[e])}const yS={debounce:"number",disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",onSelectionChange:"(newValue: string) => void",placeholder:"string",suggestions:{type:`
|
|
1
|
+
(function(_,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):(_=typeof globalThis<"u"?globalThis:_||self,x(_.DSReact={},_.React,_.utils,_.moment$4,_.dsShared,_.ReactDOM,_.dsColors,_.tabs,_.collections,_.illustrations))})(this,function(_,x,v,Je,W,vo,Oa,Ih,or,Wl){"use strict";var Jx=Object.defineProperty;var Nh=_=>{throw TypeError(_)};var Zx=(_,x,v)=>x in _?Jx(_,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[x]=v;var Yt=(_,x,v)=>Zx(_,typeof x!="symbol"?x+"":x,v),kh=(_,x,v)=>x.has(_)||Nh("Cannot "+v);var rr=(_,x,v)=>(kh(_,x,"read from private field"),v?v.call(_):x.get(_)),La=(_,x,v)=>x.has(_)?Nh("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(_):x.set(_,v),hn=(_,x,v,Je)=>(kh(_,x,"write to private field"),Je?Je.call(_,v):x.set(_,v),v);var Qn,In,xn;function Gl(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=Gl(x),ar=Gl(Je);function Yl(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=Yl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function G(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Yl(e))&&(r&&(r+=" "),r+=t);return r}const xh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ft=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=xh[n[e]&63];return t};function Sn(e){return x.useRef(e||ft())}function bt(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 Pa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mh="[object Object]";function _h(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function Lh(e,t){return function(n){return e(t(n))}}var Oh=Function.prototype,Ul=Object.prototype,zl=Oh.toString,Ph=Ul.hasOwnProperty,Rh=zl.call(Object),Bh=Ul.toString,Ah=Lh(Object.getPrototypeOf,Object);function Fh(e){return!!e&&typeof e=="object"}function Vh(e){if(!Fh(e)||Bh.call(e)!=Mh||_h(e))return!1;var t=Ah(e);if(t===null)return!0;var n=Ph.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&zl.call(n)==Rh}var $h=Vh;const jl=Pa($h),Et=new Set,sr=new Set,zt=new Set,yo=new Set;function ql(e){Et.has(e)||zt.has(e)||yo.has(e)||sr.add(e)}function Jl(e){Et.has(e)||zt.has(e)||sr.has(e)||yo.add(e)}const tt=ar.default||ar,ir="MM/DD/YYYY",Kh="MM/DD/YYYY hh:mm A",Hh="MM/DD/YYYY HH:mm",Wh="hh:mm A",Gh="HH:mm",Yh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,_r=Symbol("Date Parse Error");function lr(e){return tt.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const te=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=tt(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Yh.exec(e);if(n){const[,r,a,s]=n;return Object.freeze({year:Number(s),month:Number(r),date:Number(a)})}}return Object.freeze({[_r]:!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=tt(e,t,!0):n=tt(e):tt.isMoment(e)?n=e:n=te.toMoment(e),n!==null&&tt.isMoment(n)&&n.isValid()?n:Object.freeze({[_r]:!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=te.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(a=>te.createFrom(a,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>te.createFrom(n))},isValid(e){var t;return e?tt.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=te.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return te.isValid(e)?e:null},toMoment(e){return e?tt.isMoment(e)?e:tt({...e,month:e.month-1}):null},toString(e,t){const n=te.toMoment(e);return n&&n.isValid()?n.format(t||ir):""},toStringRange(e,t){if(!e)return"";const n=te.getRangeSeparator(t);return e.slice(0,2).map(r=>te.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&tt.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Gh}`):e.format(`${n} ${Wh}`):t?e.format(Hh):e.format(Kh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=te.getRangeSeparator(n);return e.map(a=>te.toDateTimeString(a,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:lr(e)>lr(t)},isBefore(e,t){return!e||!t?null:lr(e)<lr(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=lr(e),[a,s]=t.map(lr);return a&&s&&(n&&r>=a&&r<=s||!n&&r>a&&r<s)},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=tt(),r=n.clone().subtract(tt.duration(e.definition));return[te.createFrom(r,t),te.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();let t;e.definition==="P0D"?t=tt().startOf("day"):t=tt().subtract(tt.duration(e.definition));const n=tt().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n,r=!1){let a="";t?a=r?"23:59":"00:00":a=r?"11:59":"12:00";const s=r?"PM":"AM";return e&&tt.isMoment(e)&&e.isValid()?te.toDateTimeString(e,t,n).split(" "):["",a,t?void 0:s]},getCurrentMoment(){return tt()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",a=n[1]||"0",s=Number.isNaN(Number(r))?NaN:parseInt(r,10),l=Number.isNaN(Number(a))?NaN:parseInt(a,10),c=n.length<=2&&r.length<=2&&a.length<=2;return t?c&&s>=0&&s<=23&&l>=0&&l<=59:c&&(!Number.isNaN(s)&&r.length===1||s>=1)&&s<=12&&l>=0&&l<=59},padIncompleteTimeString(e,t=!1){if(!e)return"";const n=e.split(":"),r=parseInt(n[0]||"0",10),a=parseInt(n[1]||"0",10);if(t){const s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}else{const s=r===0?"12":r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}}}),Ra=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],Ba=["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=ir;function Zl(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[_r])return{dateFormat:To};if(!te.isValid(t))return{dateValidity:!0}}return null};Et.add("dateFormat"),Et.add("dateValidity");const Xl=function(t){if(Array.isArray(t)){const n=Lr(t);if(n)return n;if(t&&te.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};Et.add("dateRangeOrder");const Ql=function({minDate:t,maxDate:n}){function r(a){const s=te.isBefore(a,t),l=te.isAfter(a,n),c={minExceeded:s?te.toString(t,To):null,maxExceeded:l?te.toString(n,To):null};return s||l?{dateConstraint:c}:null}return function(s){if(!s)return null;if(Array.isArray(s)){const l=r(s[0]),c=r(s[1]);return l||c}return s.hasOwnProperty("year")?r(s):null}};Et.add("dateConstraint");const Uh=Object.freeze(Object.defineProperty({__proto__:null,date:Lr,dateConstraint:Ql,dateRange:Xl,setDateFormat:Zl},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 zh=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>en(r,n)};Et.add("min");const jh=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>en(r,n)};sr.add("max");const qh=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};sr.add("required");const Jh=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>en(r,n)};Et.add("minLength");const Zh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};Et.add("minLengthArray");const Xh=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 Qh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};Et.add("maxLengthArray");const eS=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(a){return n.test(a)?null:{pattern:t}}return a=>en(a,r)};Et.add("pattern");const tS=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return en(e,t)};zt.add("alpha");const nS=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return en(e,t)};zt.add("numeric");const rS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return en(e,t)};zt.add("positiveOrNegativeNumber");const oS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return en(e,t)};zt.add("nonNumeric");const Eo=Object.freeze({...Uh,min:zh,max:jh,required:qh,minLength:Jh,minLengthArray:Zh,maxLength:Xh,maxLengthArray:Qh,pattern:eS,alpha:tS,numeric:nS,nonNumeric:oS,positiveOrNegativeNumber:rS,OnBlurErrorKeys:Et});function wo(e,t=[]){const n=t.reduce((r,a)=>Object.assign(r,a(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 aS(e,t={},n=[]){for(const[r,a]of Object.entries(t))a===0?ql(r):a===2&&Jl(r);return o.useCallback(e,n)}class Rn{constructor(t,n){Yt(this,"validators",[]);La(this,Qn,null);La(this,In,null);La(this,xn,null);Yt(this,"preventativeErrors",[]);Yt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return rr(this,Qn)===null&&rr(this,In)===null&&rr(this,xn)===null?null:{...rr(this,Qn)??{},...rr(this,In)??{},...rr(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 a=wo(t,this.validators);let s={onSubmit:{},onChange:{},onBlur:{}};a&&(s=Object.keys(a).reduce((l,c)=>(yo.has(c)?l.onSubmit[c]=a[c]:sr.has(c)?l.onChange[c]=a[c]:l.onBlur[c]=a[c],l),s)),(typeof n>"u"||n===jt.ON_CHANGE)&&hn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),(typeof n>"u"||n===jt.ON_BLUR)&&hn(this,xn,Object.keys(s.onBlur).length===0?null:s.onBlur),(typeof n>"u"||n===jt.ON_SUBMIT)&&(hn(this,Qn,Object.keys(s.onSubmit).length===0?null:s.onSubmit),hn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),hn(this,xn,Object.keys(s.onBlur).length===0?null:s.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(hn(this,Qn,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(){}}Qn=new WeakMap,In=new WeakMap,xn=new WeakMap;class Or extends Rn{constructor(){super(...arguments);Yt(this,"id",ft());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(s=>zt.has(s)).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 Bn extends Or{constructor(n,r,a){super(a?r:n,a||r);Yt(this,"fields");a&&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,a)=>r&&(!this.fields[a][n]||this.fields[a][n]()),!0)}}class ec extends Bn{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class tc extends Bn{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function Co(e,t,n){return e instanceof Rn?(e.path=t,e.update=n,e):Array.isArray(e)?new tc(e,t,n):jl(e)?new ec(e,t,n):new Or(t,n)}function Pr(e,t){return t.length===0||!e?e:Pr(e.fields[t[0]],t.slice(1,t.length))}function Aa(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(a=>e.fields[a]);return t.length===0?r:r.reduce((a,s)=>[...a,...Aa(s,t)],[])}return Aa(e.fields[n],t)}function Fa(e,t,n){for(const r of Object.keys(t)){const a=t[r];for(const s of Aa(e,r.split(".")))s&&a&&n(s,a)}}function Do(e,t,n,r=!1,a=!1){Fa(t,n,(s,l)=>{s.validators=typeof l=="function"?l(e):l,r&&s.validate(v.getPath(e,s.path),void 0,a)})}function Va(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,a)=>a===Number(n)?Va(r,t):r):jl(e)?Object.keys(e).reduce((r,a)=>Object.assign(r,{[a]:a===n?Va(e[a],t):e[a]}),{}):e}function sS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function nc(e,t={}){sS(e);const[,n]=x.useState({}),r=x.useRef(!1);r.current=!1;const a=x.useRef(t),s=x.useCallback(h=>{var T,C;const S=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const E=Pr(S.formMeta,h.path);if(E){E.focused=!1;const N=v.getPath(S.formValue,h.path);E.validate(N,jt.ON_BLUR)}}else if(h.newValidators){if(a.current){const E=h.path.join(".");a.current={...a.current,[E]:h.newValidators},Do(S.formValue,S.formMeta,a.current,!0)}}else if(h.markAsSubmitted){const E=Pr(S.formMeta,h.path);if(E){E.submitted=!0;const N=v.getPath(S.formValue,h.path);E.validate(N,jt.ON_SUBMIT)}}else y=Va(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&&(a.current={...a.current,...h.updateFormOptions.validators},Do(S.formValue,S.formMeta,a.current,((C=h.updateFormOptions)==null?void 0:C.runValidators)??!0)),y){S.formMeta.submitted=!1,v.deepFreeze(y);const E=v.diff(S.formValue,y);for(const{type:M,key:I,parentPath:k,objects:[,V]}of E){const R=Pr(S.formMeta,k);if(typeof I!="symbol"&&R){let w;switch(M){case v.DiffChange.ADDITION:R.fields[I]=Co(V[I],[...k,I],c);break;case v.DiffChange.DELETION:Array.isArray(R.fields)?R.fields[I]=void 0:delete R.fields[I];break;case v.DiffChange.ALTERATION:w=Co(V[I],[...k,I],c),(w instanceof Bn&&!(R.fields[I]instanceof Bn)||!(w instanceof Bn)&&R.fields[I]instanceof Bn)&&(w.pristine=!1,R.fields[I]=w);break}}}const N=new Set;if(E.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=Pr(S.formMeta,M);Array.isArray(I.fields)&&(I.fields=I.fields.filter(k=>k!==void 0))}),a.current){Do(y,S.formMeta,a.current);const M=new Set;t&&Fa(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:[,R]}of E)if(typeof k!="symbol"){let w=S.formMeta,P=y;if(w){for(const O of V)w=w.fields[O],P=P[O],M.has(w)||w.validate(P,jt.ON_CHANGE);if(I===v.DiffChange.ADDITION||I===v.DiffChange.ALTERATION){const O=w.fields[k];if(!M.has(O)&&(w.fields[k].validate(R[k],jt.ON_CHANGE),I===v.DiffChange.ADDITION&&O.fields))for(const[$,J]of Object.entries(O.fields))J.validate(R[k][$],jt.ON_CHANGE)}}}}}u.current={...S,formValue:y||S.formValue},r.current||n({})},[]),l=x.useCallback((h,S)=>{h||S?s({value:h,updateFormOptions:S}):s()},[s]),c=x.useCallback((h,S,y=!1,T,C=!1)=>{h?s({path:h,value:S,markAsBlurred:y,newValidators:T,markAsSubmitted:C}):l()},[s,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(),a.current&&Fa(u.current.formMeta,a.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:a,formControl:s,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 Or&&l.markAsFocused()}function T(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsBlurred()}const C=G("sps-form-group",(s&&s.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(s&&!s.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function E(N){a&&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:C,ref:t,tabIndex:-1,onClick:E,onFocus:y,onBlur:T},r)});Object.assign(at,{displayName:"SpsFormComponentWrapper"});function rc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function oc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function $a(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return oc(n.overflowY,t)||oc(n.overflowX,t)||function(r){var a=function(s){if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!a&&(a.clientHeight<r.scrollHeight||a.clientWidth<r.scrollWidth)}(e)}return!1}function No(e,t,n,r,a,s,l,c){return s<e&&l>t||s>e&&l<t?0:s<=e&&c<=n||l>=t&&c>=n?s-e-r:l>t&&c<n||s<e&&c>n?l-t+a:0}var ac=function(e,t){var n=window,r=t.scrollMode,a=t.block,s=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(ke){return ke!==l};if(!rc(e))throw new TypeError("Invalid target");for(var m,f,u=document.scrollingElement||document.documentElement,h=[],S=e;rc(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&&$a(S)&&!$a(document.documentElement)||S!=null&&$a(S,c)&&h.push(S)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,T=n.visualViewport?n.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,N=e.getBoundingClientRect(),M=N.height,I=N.width,k=N.top,V=N.right,R=N.bottom,w=N.left,P=a==="start"||a==="nearest"?k:a==="end"?R:k+M/2,O=s==="center"?w+I/2:s==="end"?V:w,$=[],J=0;J<h.length;J++){var L=h[J],Z=L.getBoundingClientRect(),A=Z.height,ne=Z.width,Y=Z.top,U=Z.right,ae=Z.bottom,H=Z.left;if(r==="if-needed"&&k>=0&&w>=0&&R<=T&&V<=y&&k>=Y&&R<=ae&&w>=H&&V<=U)return $;var q=getComputedStyle(L),re=parseInt(q.borderLeftWidth,10),oe=parseInt(q.borderTopWidth,10),j=parseInt(q.borderRightWidth,10),B=parseInt(q.borderBottomWidth,10),z=0,Q=0,ee="offsetWidth"in L?L.offsetWidth-L.clientWidth-re-j:0,de="offsetHeight"in L?L.offsetHeight-L.clientHeight-oe-B:0,ie="offsetWidth"in L?L.offsetWidth===0?0:ne/L.offsetWidth:0,le="offsetHeight"in L?L.offsetHeight===0?0:A/L.offsetHeight:0;if(u===L)z=a==="start"?P:a==="end"?P-T:a==="nearest"?No(E,E+T,T,oe,B,E+P,E+P+M,M):P-T/2,Q=s==="start"?O:s==="center"?O-y/2:s==="end"?O-y:No(C,C+y,y,re,j,C+O,C+O+I,I),z=Math.max(0,z+E),Q=Math.max(0,Q+C);else{z=a==="start"?P-Y-oe:a==="end"?P-ae+B+de:a==="nearest"?No(Y,ae,A,oe,B+de,P,P+M,M):P-(Y+A/2)+de/2,Q=s==="start"?O-H-re:s==="center"?O-(H+ne/2)+ee/2:s==="end"?O-U+j+ee:No(H,U,ne,re,j+ee,O,O+I,I);var se=L.scrollLeft,Ne=L.scrollTop;P+=Ne-(z=Math.max(0,Math.min(Ne+z/le,L.scrollHeight-A/le+de))),O+=se-(Q=Math.max(0,Math.min(se+Q/ie,L.scrollWidth-ne/ie+ee)))}$.push({el:L,top:z,left:Q})}return $};function sc(e){return e===Object(e)&&Object.keys(e).length!==0}function iS(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var a=r.el,s=r.top,l=r.left;a.scroll&&n?a.scroll({top:s,left:l,behavior:t}):(a.scrollTop=s,a.scrollLeft=l)})}function lS(e){return e===!1?{block:"end",inline:"nearest"}:sc(e)?e:{block:"start",inline:"nearest"}}function ko(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(sc(t)&&typeof t.behavior=="function")return t.behavior(n?ac(e,t):[]);if(n){var r=lS(t);return iS(ac(e,r),r.behavior)}}const Ka=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"})),He=o.createContext(W.noI18nI18n),cS={alt:"string",size:"SpinnerSize",title:"string"};function Ha(e){const{alt:t,className:n,size:r=W.SpinnerSize.MEDIUM,"data-testid":a,title:s,unsafelyReplaceClassName:l,...c}=e,{t:p}=o.useContext(He),m=t||s||p("design-system:spinner.defaultAltText",{defaultValue:"Loading..."}),f=G(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:f,"data-testid":a,title:m,...c})}Object.assign(Ha,{props:cS,displayName:"SpsSpinner"});const dS=60;function Io(e){return typeof e>"u"?"inherit":`${e}px`}function Wa(e){switch(e){case W.Position.TOP_LEFT:return W.Position.BOTTOM_LEFT;case W.Position.TOP_MIDDLE:return W.Position.BOTTOM_MIDDLE;case W.Position.TOP_RIGHT:return W.Position.BOTTOM_RIGHT;case W.Position.RIGHT_TOP:return W.Position.LEFT_TOP;case W.Position.RIGHT_MIDDLE:return W.Position.LEFT_MIDDLE;case W.Position.RIGHT_BOTTOM:return W.Position.LEFT_BOTTOM;case W.Position.BOTTOM_RIGHT:return W.Position.TOP_RIGHT;case W.Position.BOTTOM_MIDDLE:return W.Position.TOP_MIDDLE;case W.Position.BOTTOM_LEFT:return W.Position.TOP_LEFT;case W.Position.LEFT_BOTTOM:return W.Position.RIGHT_BOTTOM;case W.Position.LEFT_MIDDLE:return W.Position.RIGHT_MIDDLE;case W.Position.LEFT_TOP:return W.Position.RIGHT_TOP}}function pS(e,t,n,r,a,s,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,C,E,N;switch(S){case"top":E=t.height-n.top-f-s[0];break;case"left":C=t.width-n.left-h-s[0];break;case"right":N=n.right+h-s[0];break;case"bottom":T=n.bottom+f-s[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":N=n.left+h+s[1];break;case"top":T=n.top+f+s[1];break;case"middle":S==="top"||S==="bottom"?N=n.left+h+n.width/2-a/2+s[1]:(S==="left"||S==="right")&&(T=n.top+f+n.height/2-r.height/2+s[1]);break;case"bottom":E=t.height-n.bottom-f+s[1];break;case"right":C=t.width-n.right-h+s[1];break;default:throw new Error(`Invalid position ${e}`)}return[T,C,E,N]}function An(e,t,n,{altPosition:r,setMinWidth:a=!1,setWidth:s=!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,C]=n.split(" ");let E=n;if(r&&(T==="top"&&f.top-m.height<dS||T==="right"&&f.right+m.width>h||T==="bottom"&&f.bottom+m.height>u||T==="left"&&f.left-m.width<0)&&(E=r),C==="left"&&f.left+m.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(T){case"bottom":E=W.Position.BOTTOM_RIGHT;break;case"top":E=W.Position.TOP_RIGHT;break}const N=a?Math.max(f.width,m.width):m.width,M=s?f.width:N,[I,k,V,R]=pS(E,y,f,m,M,p,l,c),w={top:Io(I),right:Io(k),bottom:Io(V),left:Io(R)};return c&&(w.position="fixed",w.zIndex=W.ZStratum.BAR),a&&(w.minWidth=`${f.width}px`),s&&(w.width=`${f.width}px`),[w,E===r]}return[{},!1]}const kt=x.createContext(null);function cr(e,t=[]){const n=x.useContext(kt);return x.useMemo(()=>r=>{const s=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=s.lastElementChild;for(;c&&c!==s.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)s.contains(l)||s.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);s.appendChild(l)}return vo.createPortal(r,l)},[n])}const Ga=["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","1","2","3","4","5","6","7","8","9","0"];async function ic(e,t,n,r,a,s){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),s.current=c?l:null;const m=c?await l||[]:l||[];if(c&&s.current!==l)return;let f=Array.from(m).filter(Boolean).map(u=>new W.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&f.unshift(new W.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),a(f.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function uS(e,t,n){const[r,a]=o.useState(Object.freeze([])),[s,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(ic,typeof e.searchDebounce<"u"?e.searchDebounce:500):ic,[p.current,e.disabledOptions]);return o.useEffect(()=>{m(e,t,n,a,l,c)},[p.current,t.value,e.disabledOptions]),[r,s]}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 mS(e,t){return{...e,...t}}function qt(e){return x.useReducer(mS,e)}function fS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:a="Search…",searchInputRef:s}){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:""}),s!=null&&s.current&&(n&&n(new gn(s.current)),s.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:a,ref:s,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 hS=ko||Ka,SS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"];function gS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function lc(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e!=null&&e.find(r=>{var a;return r[t]&&r[t]===((a=n==null?void 0:n.value)==null?void 0:a[t])})):!1}const Rr=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:a,options:s,tall:l,textKey:c,valueKey:p,zeroState:m,hideInlineSearch:f,onSearchChange:u,search:h,searchDebounce:S,searchPlaceholder:y,onSpecialActionSelect:T,attachTo:C,className:E,conformWidth:N,id:M,ignoreWidthStyles:I,isOpen:k,keepOpen:V,keyDown:R,nullOption:w,onOptionListChanged:P,onOptionSelected:O,onPositionFlip:$,onSelfToggle:J,optionRole:L,positionOverride:Z,selectedOption:A,specialAction:ne,unsafelyReplaceClassName:Y,loading:U,filterByTextAndCaptionKey:ae,maxHeightPx:H,maxHeightRem:q,disableOptionsMemoization:re,disableDefaultOptionsFiltering:oe,"data-testid":j,typeaheadEvent:B,...z}=e,Q=o.useMemo(()=>ne?new W.SpsOptionListOption(ne,{textKey:"label",captionKey:"caption"}):null,[ne]),[ee,de]=o.useState(-1),[ie,le]=o.useState(k),se=t||o.useRef(null),Ne=o.useRef(null),ke=o.useRef(null),it=cr("sps-option-list-portal"),lt=o.useContext(kt),[ut,ct]=Z||[W.Position.BOTTOM_LEFT,W.Position.TOP_LEFT],[[Pt,je],fe]=o.useState([{},!1]),Fe=o.useRef(null),[ve,Le,Qe]=fS({...e,searchInputRef:Fe}),[we,Ht]=uS(e,Le,Qe);o.useEffect(()=>{B&&pt(B)},[B]),o.useEffect(()=>{fe(ie?An(se,C,ut,{altPosition:ct,setMinWidth:!I,setWidth:!I&&N,...lt}):[{},!1])},[ie,ut,ct,we]),o.useEffect(()=>{let be;return ie&&(be=()=>{ie&&fe(An(se,C,ut,{altPosition:ct,setMinWidth:!I,setWidth:!I&&N,...lt}))},document.addEventListener("scroll",be)),()=>{be&&document.removeEventListener("scroll",be)}},[ie]),o.useEffect(()=>{de(-1)},[Le]);const Mn=G(Y||"sps-option-list","z-stratum-dropdown",ie&&"sps-option-list--open",Le.isAsync&&"sps-option-list--searchable",je&&"sps-option-list--opens-upward",ne&&ne.label&&"sps-option-list--has-special-action",E),ue=G(Y||"sps-option-list__options",l&&"sps-option-list__options--tall"),Se=o.useCallback(()=>{ie||(le(!0),Fe.current&&Fe.current.focus(),de(-1),J&&J(!0))},[ie,J]),Oe=o.useCallback(()=>{ie&&(le(!1),de(-1),J&&J(!1))},[ie,J]),Ze=o.useCallback((be,Te)=>{Te||be&&!be.disabled&&(typeof be.value=="function"?(be.value(),T&&T()):typeof O=="function"&&O(be.value),V||Oe())},[O,Oe]),Ie=o.useCallback((be,Te,Xe)=>{be.stopPropagation(),Ze(Te,Xe)},[Ze]),dt=o.useRef(a||[]);dt.current=a||[];const Tt=o.useCallback(be=>{switch(be.key){case"Tab":case"Escape":Oe();break;case"Enter":if(ee>-1){const Te=we[ee]||Q;be.preventDefault();const Xe=!!Te&&lc(dt.current,r||"",Te);!Xe&&Te&&typeof O=="function"&&typeof Te.value=="function"?Te.value():Te&&Ze(Te,Xe)}break;case"Up":case"ArrowUp":{let Te=ee;je?ee<=-1?Te=we.length-1:ee===0?ne&&(Te=we.length):ee<we.length&&(Te=ee-1):ee>-1&&(Te=ee-1),Te!==ee&&(be.preventDefault(),de(Te));break}case"Down":case"ArrowDown":{Se();let Te=ee;je?ee!==-1&&(ee>=we.length?Te=0:ee===we.length-1?Te=-1:Te=ee+1):ee<we.length-1+ +!!ne&&(Te=ee+1),Te!==ee&&(be.preventDefault(),de(Te));break}default:Se()}},[Oe,Se,ee,Ze,O,je,we]),Ae=o.useCallback(be=>{Se();const Te=we.findIndex(Xe=>{if(Xe.textKey){const Rt=Xe.textKey;return Xe.value[Rt].toLowerCase().charAt([0])===be.key.toLocaleLowerCase()}return Xe.value.toString().toLowerCase().charAt([0])===be.key.toLocaleLowerCase()});Te>-1&&de(Te)},[we]),pt=o.useCallback(be=>{be&&(SS.includes(be.key)?Tt(be):Ga.includes(be.key)&&!f&&Ae(be))},[Oe,Se,ee,Ze,O,je,we]);o.useEffect(()=>{if(lt!==null&&document.getElementsByClassName("sps-modal__body").length>0){const be=()=>{J&&J(!1)},Te=document.getElementsByClassName("sps-modal__body")[0];return Te.addEventListener("scroll",be),()=>{Te.removeEventListener("scroll",be)}}},[]),o.useEffect(()=>{ie&&ke.current&&hS(ke.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[ee,ie]),o.useEffect(()=>{le(k),k?Fe.current&&Fe.current.focus():de(-1)},[k]),o.useEffect(()=>{R&&pt(R)},[R]),o.useEffect(()=>{!ie&&Ne.current&&(Qe({value:""}),Ne.current.scrollTop=0),ie&&$&&$(je)},[ie]);const _n=H?H/16:q,Xt=_n?{maxHeight:`${_n}rem`}:{};function va(be,Te){return Te?o.createElement(o.Fragment,null,be.split(Te).map((Xe,Rt)=>Te.test(Xe)?o.createElement("u",{key:Rt},Xe):o.createElement(o.Fragment,{key:Rt},Xe))):o.createElement(o.Fragment,null,be)}return it(o.createElement("div",{className:Mn,id:M,"aria-activedescendant":ee>-1?`${M}-option-${ee}`:"",tabIndex:-1,ref:se,style:Pt,onMouseLeave:()=>de(-1),"data-testid":j,...z},ve,o.createElement("div",{className:ue,ref:Ne,"data-testid":`${j}-options`,style:Xt},!U&&!Le.pending&&m&&we.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},m),(U||Le.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Ha,null)),!U&&!Le.pending&&we.map((be,Te)=>{const Xe=`${M}-option-${Te}`,Rt=gS(be.value,A,r),me=lc(dt.current,r||"",be);return o.createElement("a",{key:Xe,id:Xe,role:L,"aria-selected":Rt,href:be.href,className:G("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",(Rt||me)&&"sps-option-list__option--selected",ee===Te&&"sps-option-list__option--highlighted"),onClick:wl=>Ie(wl,be,me),onMouseOver:()=>de(Te),tabIndex:-1,ref:ee===Te?ke:null,"data-testid":`${j}-option-${Te}`},be.value&&be.value.icon&&o.createElement("i",{className:G("sps-icon","sps-option-list__option-icon",`sps-icon-${String(be.value.icon)}`)}),(!be.value||!be.value.icon&&Ht)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,va(be.text,Le.replacementPattern)),be.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,va(be.caption,Le.replacementPattern))))})),Q&&(ne==null?void 0:ne.label)&&o.createElement("a",{className:G("sps-option-list__option","sps-option-list__special-action",ee===we.length&&"sps-option-list__option--highlighted",ne.disabled&&"sps-option-list__special-action--disabled"),href:Q.href,target:Q.href&&ne.newTab?"_blank":"_self",onClick:be=>Ie(be,Q),onMouseOver:()=>de(we.length),"data-testid":`${j}-special-action`},ne.icon&&o.createElement("i",{className:G("sps-icon","sps-option-list__option-icon",`sps-icon-${String(ne.icon)}`)}),!ne.icon&&Ht&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,ne.label))))});Object.assign(Rr,{displayName:"SpsOptionList"});function bS(e,t,n=[]){return o.useMemo(()=>{function r(a){return o.createElement(e,{...a,...t},a.children)}return r},n)}function vt(e){return typeof e=="function"?e():e}const cc=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(cc,{elements:t.slice(1)},e))},dc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(cc,{elements:t},e))},vS=function({children:e,className:t,...n}){return o.createElement(dc,{className:`sps-app ${t}`,...n},e)};function It(e=[],t=[]){const n=Array.isArray(e)?v.flatten(e):[e],r=t.map(s=>Array.isArray(s)?s:[s]),a=new Array(r.length+1).fill(null).map(()=>[]);for(const s of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:m={}}of r[c])if(s.type===p&&Object.keys(m).every(u=>m[u]===s.props[u])){l=!0,a[c].push(s);break}l||a[a.length-1].push(s)}return a}function pc(e,t,n){const r=Object.entries(t).filter(([,s])=>typeof s!="string"&&s.deprecated).map(([s])=>s),a=r.map(s=>n[s]);o.useEffect(()=>{a.find(s=>typeof s<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},a)}function Ya(e,t){const n=x.useRef(!1);x.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Ua(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 uc(e,t,n){return function(a){var s,l;!((s=e.current)!=null&&s.contains(a.target))&&!((l=t.current)!=null&&l.contains(a.target))&&n()}}function dr(e,t,n){const r=o.useRef(!1),[a,s]=o.useState(!1),l=o.useCallback(()=>{r.current?r.current=!1:s(!0)},[]),c=o.useCallback((p=!1)=>{s(!1),r.current=p,n&&n()},[]);return Ua("mousedown",uc,[e,t,c]),Ua("pointerdown",uc,[e,t,c]),{showPopup:a,doShowPopup:l,doHidePopup:c}}const mc=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),a=c=>r(c,"overflow")+r(c,"overflow-y"),s=c=>t.test(a(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(s(p[m]))return p[m];return null})(e)};let za=0;function Br({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,a;if(e&&t.current){za+=1,n=mc(t.current)||document.body,r=n===document.body?window.innerWidth-document.documentElement.clientWidth:n.offsetWidth-n.clientWidth,n.style.overflow="hidden";const s=window.getComputedStyle(n).paddingRight;if(n.style.paddingRight=s&&s!=="0px"?`calc(${s} + ${r}px)`:`${r}px`,n===document.body)if(a=document.getElementsByClassName("sps-navbar-container").item(0),a&&window.getComputedStyle(a).position==="fixed"){const l=window.getComputedStyle(a).paddingRight;a.style.paddingRight=l&&l!=="0px"?`calc(${l} + ${r}px)`:`${r}px`}else{const l=document.getElementsByTagName("nav").item(0);if(a=l==null?void 0:l.parentElement,a&&window.getComputedStyle(a).position==="fixed"){const c=window.getComputedStyle(a).paddingRight;a.style.paddingRight=c&&c!=="0px"?`calc(${c} + ${r}px)`:`${r}px`}}}return()=>{n&&(za-=1,za===0&&(n.style.overflow=null,n.style.paddingRight=null,a&&(a.style.paddingRight=null)))}},[e])}const yS={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
|
-
`,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:a,onChange:s,onSelectionChange:l,icon:c,id:p,placeholder:m="",suggestions:f,unsafelyReplaceClassName:u,tallOptionList:h,value:S="",zeroState:y,loading:T,maxHeightOptionListPx:C,maxHeightOptionListRem:E,disableOptionsMemoization:N,inputNotClearable:M,autoFocusOnSelection:I,"data-testid":k,...V}){const R=a||r,{wrapperId:w,controlId:P}=bt(p,R),[O,$]=qt({keyDown:null,opensUpward:!1}),J=o.useRef(null),L=o.useRef(null),Z=o.useRef(null),{showPopup:A,doShowPopup:ne,doHidePopup:Y}=dr(J,Z);function U(B,z,Q=!1){R&&(R.setValue(B),R.markAsDirty()),l&&Q?l(B):s&&s(z||new gn({value:B}))}function ae(B){L.current&&(L.current.value="",U("")),B.stopPropagation()}function H(B){U(B.target.value,B)}function q(B){n||(["Up","ArrowUp","Down","ArrowDown","Enter"].indexOf(B.key)>-1&&(B.preventDefault(),B.persist()),B.stopPropagation(),$({keyDown:B})),B.key==="Tab"&&Y()}function re(B){B?ne():Y()}function oe(B){$({opensUpward:B})}const j=G(u||"sps-autocomplete",A&&"sps-autocomplete--open",A&&"z-stratum-dropdown",O.opensUpward&&"sps-autocomplete--opens-upward",n&&"sps-form-control--disabled",e);return o.useEffect(()=>{let B;return A&&(B=()=>{Y()},window.addEventListener("resize",B)),()=>{B&&window.removeEventListener("resize",B)}},[A]),
|
|
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:a,onChange:s,onSelectionChange:l,icon:c,id:p,placeholder:m="",suggestions:f,unsafelyReplaceClassName:u,tallOptionList:h,value:S="",zeroState:y,loading:T,maxHeightOptionListPx:C,maxHeightOptionListRem:E,disableOptionsMemoization:N,inputNotClearable:M,autoFocusOnSelection:I,"data-testid":k,...V}){const R=a||r,{wrapperId:w,controlId:P}=bt(p,R),[O,$]=qt({keyDown:null,opensUpward:!1}),J=o.useRef(null),L=o.useRef(null),Z=o.useRef(null),{showPopup:A,doShowPopup:ne,doHidePopup:Y}=dr(J,Z);function U(B,z,Q=!1){R&&(R.setValue(B),R.markAsDirty()),l&&Q?l(B):s&&s(z||new gn({value:B}))}function ae(B){L.current&&(L.current.value="",U("")),B.stopPropagation()}function H(B){U(B.target.value,B)}function q(B){n||(["Up","ArrowUp","Down","ArrowDown","Enter"].indexOf(B.key)>-1&&(B.preventDefault(),B.persist()),B.stopPropagation(),$({keyDown:B})),B.key==="Tab"&&Y()}function re(B){B?ne():Y()}function oe(B){$({opensUpward:B})}const j=G(u||"sps-autocomplete",A&&"sps-autocomplete--open",A&&"z-stratum-dropdown",O.opensUpward&&"sps-autocomplete--opens-upward",n&&"sps-form-control--disabled",e);return o.useEffect(()=>{let B;return A&&(B=()=>{Y()},window.addEventListener("resize",B)),()=>{B&&window.removeEventListener("resize",B)}},[A]),Br({isOpen:A,rootRef:J}),o.createElement(at,{id:w,className:j,formControl:r,formMeta:a,inputRef:L,ref:J,focusInputOnClick:!0,onClick:B=>B.nativeEvent.stopImmediatePropagation(),"data-testid":`${k}`},o.createElement("div",{className:"sps-text-input"},o.createElement("div",{className:"sps-form-control"},c&&o.createElement("i",{className:G("sps-text-input__icon","sps-icon",`sps-icon-${c}`)}),o.createElement("input",{type:"text",ref:L,value:S,className:"sps-text-input__input",placeholder:m,onFocus:ne,onClick:ne,onChange:H,onKeyDown:q,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:B=>ae(B)}))),o.createElement(Rr,{id:`${w}_options`,ref:Z,attachTo:J,isOpen:A,options:f,hideInlineSearch:!0,keyDown:O.keyDown,onOptionSelected:B=>{var z;U(B,void 0,!0),I&&((z=L.current)==null||z.focus())},onPositionFlip:oe,onSelfToggle:re,offsets:[1,0],search:S,searchDebounce:t,tall:h,zeroState:y,loading:T,maxHeightPx:C,maxHeightRem:E,disableOptionsMemoization:N}))}Object.assign(Jt,{props:yS,displayName:"SpsAutocomplete"});const fc={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
5
5
|
import { SpsAutocomplete } from "@spscommerce/ds-react";
|
|
6
6
|
|
|
7
7
|
function DemoComponent() {
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
</SpsSummaryListRow>
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
|
-
`}}}},ES={disabled:"boolean",href:"string",kind:"ClickableTagKind",onAdd:"() => void",onRemove:"() => void"};function
|
|
226
|
+
`}}}},ES={disabled:"boolean",href:"string",kind:"ClickableTagKind",onAdd:"() => void",onRemove:"() => void"};function Ar(e){const{children:t,className:n,disabled:r,href:a,kind:s=W.ClickableTagKind.BLUE,onAdd:l,onRemove:c,onClick:p,"data-testid":m,unsafelyReplaceClassName:f,...u}=e,h=G(f||"sps-clickable-tag",`sps-clickable-tag--${s}`,n,r&&"sps-clickable-tag--disabled",(l||c)&&"sps-clickable-tag--icon"),S=G("sps-clickable-tag__label",(a||p)&&"sps-clickable-tag__label--link"),y=o.Children.toArray(t).filter(E=>typeof E=="string").join("");function T(E){l?l():c&&c(),E.stopPropagation()}o.useEffect(()=>{if(c&&l)throw new Error("Clickable tag should have onRemove or onAdd, not both")},[l,c]);function C(E){E.stopPropagation(),p&&p(E)}return o.createElement("div",{className:h,"data-testid":m,...u},o.createElement("span",{className:S,title:y,onClick:C},a&&o.createElement("a",{href:a},t),!a&&t),(l||c)&&!r&&o.createElement("div",{className:"sps-clickable-tag__icon",onClick:T,tabIndex:-1,"aria-label":l?"Add":"Remove"},o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${l?W.SpsIcon.PLUS_SIGN:W.SpsIcon.X}`,"data-testid":`${m}__icon`})))}Object.assign(Ar,{props:ES,displayName:"SpsClickableTag"});const Sc={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
227
227
|
import { SpsClickableTag } from "@spscommerce/ds-react";
|
|
228
228
|
import { ClickableTagKind } from "@spscommerce/ds-shared";
|
|
229
229
|
function Component() {
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
</>
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
|
-
`}}}};function ja(e,t){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ja(e,t)}function gc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ja(e,t)}function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye.apply(null,arguments)}function
|
|
326
|
+
`}}}};function ja(e,t){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ja(e,t)}function gc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ja(e,t)}function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye.apply(null,arguments)}function Fr(e){"@babel/helpers - typeof";return Fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fr(e)}function wS(e,t){if(Fr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Fr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CS(e){var t=wS(e,"string");return Fr(t)=="symbol"?t:t+""}function DS(e,t,n){return(t=CS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bc(Object(n),!0).forEach(function(r){DS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var yc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),qa=function(){return Math.random().toString(36).substring(7).split("").join(".")},Tc={INIT:"@@redux/INIT"+qa(),REPLACE:"@@redux/REPLACE"+qa(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+qa()}};function NS(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function kS(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(MS(e))return"date";if(xS(e))return"error";var n=IS(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function IS(e){return typeof e.constructor=="function"?e.constructor.name:null}function xS(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function MS(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Vn(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=kS(e)),t}function Ec(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?yt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?yt(1):"Expected the enhancer to be a function. Instead, received: '"+Vn(n)+"'");return n(Ec)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?yt(2):"Expected the root reducer to be a function. Instead, received: '"+Vn(e)+"'");var a=e,s=t,l=[],c=l,p=!1;function m(){c===l&&(c=l.slice())}function f(){if(p)throw new Error(process.env.NODE_ENV==="production"?yt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function u(T){if(typeof T!="function")throw new Error(process.env.NODE_ENV==="production"?yt(4):"Expected the listener to be a function. Instead, received: '"+Vn(T)+"'");if(p)throw new Error(process.env.NODE_ENV==="production"?yt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var C=!0;return m(),c.push(T),function(){if(C){if(p)throw new Error(process.env.NODE_ENV==="production"?yt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");C=!1,m();var N=c.indexOf(T);c.splice(N,1),l=null}}}function h(T){if(!NS(T))throw new Error(process.env.NODE_ENV==="production"?yt(7):"Actions must be plain objects. Instead, the actual type was: '"+Vn(T)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof T.type>"u")throw new Error(process.env.NODE_ENV==="production"?yt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(p)throw new Error(process.env.NODE_ENV==="production"?yt(9):"Reducers may not dispatch actions.");try{p=!0,s=a(s,T)}finally{p=!1}for(var C=l=c,E=0;E<C.length;E++){var N=C[E];N()}return T}function S(T){if(typeof T!="function")throw new Error(process.env.NODE_ENV==="production"?yt(10):"Expected the nextReducer to be a function. Instead, received: '"+Vn(T));a=T,h({type:Tc.REPLACE})}function y(){var T,C=u;return T={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(process.env.NODE_ENV==="production"?yt(11):"Expected the observer to be an object. Instead, received: '"+Vn(N)+"'");function M(){N.next&&N.next(f())}M();var I=C(M);return{unsubscribe:I}}},T[yc]=function(){return this},T}return h({type:Tc.INIT}),r={dispatch:h,subscribe:u,getState:f,replaceReducer:S},r[yc]=y,r}function wc(e,t){return function(){return t(e.apply(this,arguments))}}function Cc(e,t){if(typeof e=="function")return wc(e,t);if(typeof e!="object"||e===null)throw new Error(process.env.NODE_ENV==="production"?yt(16):"bindActionCreators expected an object or a function, but instead received: '"+Vn(e)+`'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);var n={};for(var r in e){var a=e[r];typeof a=="function"&&(n[r]=wc(a,t))}return n}function Dc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,a){return function(){return r(a.apply(void 0,arguments))}})}function _S(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var a=r.apply(void 0,arguments),s=function(){throw new Error(process.env.NODE_ENV==="production"?yt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},l={getState:a.getState,dispatch:function(){return s.apply(void 0,arguments)}},c=t.map(function(p){return p(l)});return s=Dc.apply(void 0,c)(a.dispatch),vc(vc({},a),{},{dispatch:s})}}}var Ja={exports:{}},Za={exports:{}},Re={};/** @license React v16.13.1
|
|
327
327
|
* react-is.production.min.js
|
|
328
328
|
*
|
|
329
329
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -356,16 +356,16 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
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 zc;function eg(){return zc||(zc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,a=60114,s=60109,l=60110,c=60112,p=60113,m=60120,f=60115,u=60116,h=60121,S=60122,y=60117,T=60129,C=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),n=E("react.fragment"),r=E("react.strict_mode"),a=E("react.profiler"),s=E("react.provider"),l=E("react.context"),c=E("react.forward_ref"),p=E("react.suspense"),m=E("react.suspense_list"),f=E("react.memo"),u=E("react.lazy"),h=E("react.block"),S=E("react.server.block"),y=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),T=E("react.debug_trace_mode"),E("react.offscreen"),C=E("react.legacy_hidden")}var N=!1;function M(le){return!!(typeof le=="string"||typeof le=="function"||le===n||le===a||le===T||le===r||le===p||le===m||le===C||N||typeof le=="object"&&le!==null&&(le.$$typeof===u||le.$$typeof===f||le.$$typeof===s||le.$$typeof===l||le.$$typeof===c||le.$$typeof===y||le.$$typeof===h||le[0]===S))}function I(le){if(typeof le=="object"&&le!==null){var se=le.$$typeof;switch(se){case e:var Ne=le.type;switch(Ne){case n:case a:case r:case p:case m:return Ne;default:var ke=Ne&&Ne.$$typeof;switch(ke){case l:case c:case u:case f:case s:return ke;default:return se}}case t:return se}}}var k=l,V=s,R=e,w=c,P=n,O=u,$=f,J=t,L=a,Z=r,A=p,ne=!1,Y=!1;function U(le){return ne||(ne=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ae(le){return Y||(Y=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(le){return I(le)===l}function q(le){return I(le)===s}function re(le){return typeof le=="object"&&le!==null&&le.$$typeof===e}function oe(le){return I(le)===c}function j(le){return I(le)===n}function B(le){return I(le)===u}function z(le){return I(le)===f}function Q(le){return I(le)===t}function ee(le){return I(le)===a}function de(le){return I(le)===r}function ie(le){return I(le)===p}$e.ContextConsumer=k,$e.ContextProvider=V,$e.Element=R,$e.ForwardRef=w,$e.Fragment=P,$e.Lazy=O,$e.Memo=$,$e.Portal=J,$e.Profiler=L,$e.StrictMode=Z,$e.Suspense=A,$e.isAsyncMode=U,$e.isConcurrentMode=ae,$e.isContextConsumer=H,$e.isContextProvider=q,$e.isElement=re,$e.isForwardRef=oe,$e.isFragment=j,$e.isLazy=B,$e.isMemo=z,$e.isPortal=Q,$e.isProfiler=ee,$e.isStrictMode=de,$e.isSuspense=ie,$e.isValidElementType=M,$e.typeOf=I}()),$e}process.env.NODE_ENV==="production"?cs.exports=QS():cs.exports=eg();var jc=cs.exports,tg=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],ng=["reactReduxForwardedRef"],rg=[],og=[null,null],ag=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function sg(e,t){var n=e[1];return[t.payload,n+1]}function qc(e,t,n){Fc(function(){return e.apply(void 0,t)},n)}function ig(e,t,n,r,a,s,l){e.current=r,t.current=a,n.current=!1,s.current&&(s.current=null,l())}function lg(e,t,n,r,a,s,l,c,p,m){if(e){var f=!1,u=null,h=function(){if(!f){var T=t.getState(),C,E;try{C=r(T,a.current)}catch(N){E=N,u=N}E||(u=null),C===s.current?l.current||p():(s.current=C,c.current=C,l.current=!0,m({type:"STORE_UPDATED",payload:{error:E}}))}};n.onStateChange=h,n.trySubscribe(),h();var S=function(){if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return S}}var cg=function(){return[null,0]};function dg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,a=r===void 0?function(V){return"ConnectAdvanced("+V+")"}:r,s=n.methodName,l=s===void 0?"connectAdvanced":s,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,C=T===void 0?!1:T,E=n.context,N=E===void 0?ss:E,M=xo(n,tg);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(R){if(process.env.NODE_ENV!=="production"&&!jc.isValidElementType(R))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+ag(R)));var w=R.displayName||R.name||"Component",P=a(w),O=ye({},M,{getDisplayName:a,methodName:l,renderCountProp:p,shouldHandleStateChanges:f,storeKey:h,displayName:P,wrappedComponentName:w,WrappedComponent:R}),$=M.pure;function J(Y){return e(Y.dispatch,O)}var L=$?x.useMemo:function(Y){return Y()};function Z(Y){var U=x.useMemo(function(){var ve=Y.reactReduxForwardedRef,Le=xo(Y,ng);return[Y.context,ve,Le]},[Y]),ae=U[0],H=U[1],q=U[2],re=x.useMemo(function(){return ae&&ae.Consumer&&jc.isContextConsumer(x.createElement(ae.Consumer,null))?ae:k},[ae,k]),oe=x.useContext(re),j=!!Y.store&&!!Y.store.getState&&!!Y.store.dispatch,B=!!oe&&!!oe.store;if(process.env.NODE_ENV!=="production"&&!j&&!B)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 z=j?Y.store:oe.store,Q=x.useMemo(function(){return J(z)},[z]),ee=x.useMemo(function(){if(!f)return og;var ve=Ac(z,j?null:oe.subscription),Le=ve.notifyNestedSubs.bind(ve);return[ve,Le]},[z,j,oe]),de=ee[0],ie=ee[1],le=x.useMemo(function(){return j?oe:ye({},oe,{subscription:de})},[j,oe,de]),se=x.useReducer(sg,rg,cg),Ne=se[0],ke=Ne[0],it=se[1];if(ke&&ke.error)throw ke.error;var lt=x.useRef(),ut=x.useRef(q),ct=x.useRef(),Pt=x.useRef(!1),je=L(function(){return ct.current&&q===ut.current?ct.current:Q(z.getState(),q)},[z,ke,q]);qc(ig,[ut,lt,Pt,q,je,ct,ie]),qc(lg,[f,z,de,Q,ut,lt,Pt,ct,ie,it],[z,de,Q]);var fe=x.useMemo(function(){return x.createElement(R,ye({},je,{ref:H}))},[H,R,je]),Fe=x.useMemo(function(){return f?x.createElement(re.Provider,{value:le},fe):fe},[re,fe,le]);return Fe}var A=$?x.memo(Z):Z;if(A.WrappedComponent=R,A.displayName=Z.displayName=P,C){var ne=x.forwardRef(function(U,ae){return x.createElement(A,ye({},U,{reactReduxForwardedRef:ae}))});return ne.displayName=P,ne.WrappedComponent=R,Yc(ne,R)}return Yc(A,R)}}function Jc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ds(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 a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Jc(e[n[a]],t[n[a]]))return!1;return!0}function pg(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 a in e)r(a);return n}function ug(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 Zc(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Xc(e,t,n){ug(e)||Zc(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ps(e){return function(n,r){var a=e(n,r);function s(){return a}return s.dependsOnOwnProps=!1,s}}function Qc(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function ed(e,t){return function(r,a){var s=a.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=Qc(e);var f=l(p,m);return typeof f=="function"&&(l.mapToProps=f,l.dependsOnOwnProps=Qc(f),f=l(p,m)),process.env.NODE_ENV!=="production"&&Xc(f,s,t),f},l}}function mg(e){return typeof e=="function"?ed(e,"mapDispatchToProps"):void 0}function fg(e){return e?void 0:ps(function(t){return{dispatch:t}})}function hg(e){return e&&typeof e=="object"?ps(function(t){return pg(e,t)}):void 0}const Sg=[mg,fg,hg];function gg(e){return typeof e=="function"?ed(e,"mapStateToProps"):void 0}function bg(e){return e?void 0:ps(function(){return{}})}const vg=[gg,bg];function yg(e,t,n){return ye({},n,e,t)}function Tg(e){return function(n,r){var a=r.displayName,s=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(f,u,h){var S=e(f,u,h);return c?(!s||!l(S,p))&&(p=S):(c=!0,p=S,process.env.NODE_ENV!=="production"&&Xc(p,a,"mergeProps")),p}}}function Eg(e){return typeof e=="function"?Tg(e):void 0}function wg(e){return e?void 0:function(){return yg}}const Cg=[Eg,wg];function us(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||Zc("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function Dg(e,t,n,r){us(e,"mapStateToProps",r),us(t,"mapDispatchToProps",r),us(n,"mergeProps",r)}var Ng=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function kg(e,t,n,r){return function(s,l){return n(e(s,l),t(r,l),l)}}function Ig(e,t,n,r,a){var s=a.areStatesEqual,l=a.areOwnPropsEqual,c=a.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 C(){return e.dependsOnOwnProps&&(u=e(m,f)),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function E(){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=!s(M,m,I,f);return m=M,f=I,k&&V?T():k?C():V?E():S}return function(I,k){return p?N(I,k):y(I,k)}}function xg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,s=xo(t,Ng),l=n(e,s),c=r(e,s),p=a(e,s);process.env.NODE_ENV!=="production"&&Dg(l,c,p,s.displayName);var m=s.pure?Ig:kg;return m(l,c,p,e,s)}var Mg=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ms(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(s,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function _g(e,t){return e===t}function Lg(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?dg:n,a=t.mapStateToPropsFactories,s=a===void 0?vg:a,l=t.mapDispatchToPropsFactories,c=l===void 0?Sg:l,p=t.mergePropsFactories,m=p===void 0?Cg:p,f=t.selectorFactory,u=f===void 0?xg:f;return function(S,y,T,C){C===void 0&&(C={});var E=C,N=E.pure,M=N===void 0?!0:N,I=E.areStatesEqual,k=I===void 0?_g:I,V=E.areOwnPropsEqual,R=V===void 0?ds:V,w=E.areStatePropsEqual,P=w===void 0?ds:w,O=E.areMergedPropsEqual,$=O===void 0?ds:O,J=xo(E,Mg),L=ms(S,s,"mapStateToProps"),Z=ms(y,c,"mapDispatchToProps"),A=ms(T,m,"mergeProps");return r(u,ye({methodName:"connect",getDisplayName:function(Y){return"Connect("+Y+")"},shouldHandleStateChanges:!!S,initMapStateToProps:L,initMapDispatchToProps:Z,initMergeProps:A,pure:M,areStatesEqual:k,areOwnPropsEqual:R,areStatePropsEqual:P,areMergedPropsEqual:$},J))}}const td=Lg();HS(bo.unstable_batchedUpdates);function Og(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 nd(e,t){var n=x.useState(function(){return{inputs:t,result:e()}})[0],r=x.useRef(!0),a=x.useRef(n),s=r.current||!!(t&&a.current.inputs&&Og(t,a.current.inputs)),l=s?a.current:{inputs:t,result:e()};return x.useEffect(function(){r.current=!1,a.current=l},[l]),l.result}function Pg(e,t){return nd(function(){return e},t)}var Me=nd,ge=Pg,Rg=process.env.NODE_ENV==="production",fs="Invariant failed";function rd(e,t){if(Rg)throw new Error(fs);var n=typeof t=="function"?t():t,r=n?"".concat(fs,": ").concat(n):fs;throw new Error(r)}var At=function(t){var n=t.top,r=t.right,a=t.bottom,s=t.left,l=r-s,c=a-n,p={top:n,right:r,bottom:a,left:s,width:l,height:c,x:s,y:n,center:{x:(r+s)/2,y:(a+n)/2}};return p},hs=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},od=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Bg=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Ss={top:0,right:0,bottom:0,left:0},gs=function(t){var n=t.borderBox,r=t.margin,a=r===void 0?Ss:r,s=t.border,l=s===void 0?Ss:s,c=t.padding,p=c===void 0?Ss:c,m=At(hs(n,a)),f=At(od(n,l)),u=At(od(f,p));return{marginBox:m,borderBox:At(n),paddingBox:f,contentBox:u,margin:a,border:l,padding:p}},xt=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var a=Number(n);return isNaN(a)&&(process.env.NODE_ENV!=="production"?rd(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):rd()),a},Ag=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Mo=function(t,n){var r=t.borderBox,a=t.border,s=t.margin,l=t.padding,c=Bg(r,n);return gs({borderBox:c,border:a,margin:s,padding:l})},_o=function(t,n){return n===void 0&&(n=Ag()),Mo(t,n)},ad=function(t,n){var r={top:xt(n.marginTop),right:xt(n.marginRight),bottom:xt(n.marginBottom),left:xt(n.marginLeft)},a={top:xt(n.paddingTop),right:xt(n.paddingRight),bottom:xt(n.paddingBottom),left:xt(n.paddingLeft)},s={top:xt(n.borderTopWidth),right:xt(n.borderRightWidth),bottom:xt(n.borderBottomWidth),left:xt(n.borderLeftWidth)};return gs({borderBox:t,margin:r,padding:a,border:s})},sd=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return ad(n,r)},id=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Fg(e,t){return!!(e===t||id(e)&&id(t))}function Vg(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Fg(e[n],t[n]))return!1;return!0}function nt(e,t){t===void 0&&(t=Vg);var n,r=[],a,s=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return s&&n===this&&t(c,r)||(a=e.apply(this,c),s=!0,n=this,r=c),a}return l}var Fr=function(t){var n=[],r=null,a=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 a.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},a},$g=process.env.NODE_ENV==="production",Kg=/[ \t]{2,}/g,Hg=/^[ \t]*/gm,ld=function(t){return t.replace(Kg," ").replace(Hg,"").trim()},Wg=function(t){return ld(`
|
|
359
|
+
*/var zc;function eg(){return zc||(zc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,a=60114,s=60109,l=60110,c=60112,p=60113,m=60120,f=60115,u=60116,h=60121,S=60122,y=60117,T=60129,C=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),n=E("react.fragment"),r=E("react.strict_mode"),a=E("react.profiler"),s=E("react.provider"),l=E("react.context"),c=E("react.forward_ref"),p=E("react.suspense"),m=E("react.suspense_list"),f=E("react.memo"),u=E("react.lazy"),h=E("react.block"),S=E("react.server.block"),y=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),T=E("react.debug_trace_mode"),E("react.offscreen"),C=E("react.legacy_hidden")}var N=!1;function M(le){return!!(typeof le=="string"||typeof le=="function"||le===n||le===a||le===T||le===r||le===p||le===m||le===C||N||typeof le=="object"&&le!==null&&(le.$$typeof===u||le.$$typeof===f||le.$$typeof===s||le.$$typeof===l||le.$$typeof===c||le.$$typeof===y||le.$$typeof===h||le[0]===S))}function I(le){if(typeof le=="object"&&le!==null){var se=le.$$typeof;switch(se){case e:var Ne=le.type;switch(Ne){case n:case a:case r:case p:case m:return Ne;default:var ke=Ne&&Ne.$$typeof;switch(ke){case l:case c:case u:case f:case s:return ke;default:return se}}case t:return se}}}var k=l,V=s,R=e,w=c,P=n,O=u,$=f,J=t,L=a,Z=r,A=p,ne=!1,Y=!1;function U(le){return ne||(ne=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ae(le){return Y||(Y=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(le){return I(le)===l}function q(le){return I(le)===s}function re(le){return typeof le=="object"&&le!==null&&le.$$typeof===e}function oe(le){return I(le)===c}function j(le){return I(le)===n}function B(le){return I(le)===u}function z(le){return I(le)===f}function Q(le){return I(le)===t}function ee(le){return I(le)===a}function de(le){return I(le)===r}function ie(le){return I(le)===p}$e.ContextConsumer=k,$e.ContextProvider=V,$e.Element=R,$e.ForwardRef=w,$e.Fragment=P,$e.Lazy=O,$e.Memo=$,$e.Portal=J,$e.Profiler=L,$e.StrictMode=Z,$e.Suspense=A,$e.isAsyncMode=U,$e.isConcurrentMode=ae,$e.isContextConsumer=H,$e.isContextProvider=q,$e.isElement=re,$e.isForwardRef=oe,$e.isFragment=j,$e.isLazy=B,$e.isMemo=z,$e.isPortal=Q,$e.isProfiler=ee,$e.isStrictMode=de,$e.isSuspense=ie,$e.isValidElementType=M,$e.typeOf=I}()),$e}process.env.NODE_ENV==="production"?cs.exports=QS():cs.exports=eg();var jc=cs.exports,tg=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],ng=["reactReduxForwardedRef"],rg=[],og=[null,null],ag=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function sg(e,t){var n=e[1];return[t.payload,n+1]}function qc(e,t,n){Fc(function(){return e.apply(void 0,t)},n)}function ig(e,t,n,r,a,s,l){e.current=r,t.current=a,n.current=!1,s.current&&(s.current=null,l())}function lg(e,t,n,r,a,s,l,c,p,m){if(e){var f=!1,u=null,h=function(){if(!f){var T=t.getState(),C,E;try{C=r(T,a.current)}catch(N){E=N,u=N}E||(u=null),C===s.current?l.current||p():(s.current=C,c.current=C,l.current=!0,m({type:"STORE_UPDATED",payload:{error:E}}))}};n.onStateChange=h,n.trySubscribe(),h();var S=function(){if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return S}}var cg=function(){return[null,0]};function dg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,a=r===void 0?function(V){return"ConnectAdvanced("+V+")"}:r,s=n.methodName,l=s===void 0?"connectAdvanced":s,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,C=T===void 0?!1:T,E=n.context,N=E===void 0?ss:E,M=xo(n,tg);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(R){if(process.env.NODE_ENV!=="production"&&!jc.isValidElementType(R))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+ag(R)));var w=R.displayName||R.name||"Component",P=a(w),O=ye({},M,{getDisplayName:a,methodName:l,renderCountProp:p,shouldHandleStateChanges:f,storeKey:h,displayName:P,wrappedComponentName:w,WrappedComponent:R}),$=M.pure;function J(Y){return e(Y.dispatch,O)}var L=$?x.useMemo:function(Y){return Y()};function Z(Y){var U=x.useMemo(function(){var ve=Y.reactReduxForwardedRef,Le=xo(Y,ng);return[Y.context,ve,Le]},[Y]),ae=U[0],H=U[1],q=U[2],re=x.useMemo(function(){return ae&&ae.Consumer&&jc.isContextConsumer(x.createElement(ae.Consumer,null))?ae:k},[ae,k]),oe=x.useContext(re),j=!!Y.store&&!!Y.store.getState&&!!Y.store.dispatch,B=!!oe&&!!oe.store;if(process.env.NODE_ENV!=="production"&&!j&&!B)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 z=j?Y.store:oe.store,Q=x.useMemo(function(){return J(z)},[z]),ee=x.useMemo(function(){if(!f)return og;var ve=Ac(z,j?null:oe.subscription),Le=ve.notifyNestedSubs.bind(ve);return[ve,Le]},[z,j,oe]),de=ee[0],ie=ee[1],le=x.useMemo(function(){return j?oe:ye({},oe,{subscription:de})},[j,oe,de]),se=x.useReducer(sg,rg,cg),Ne=se[0],ke=Ne[0],it=se[1];if(ke&&ke.error)throw ke.error;var lt=x.useRef(),ut=x.useRef(q),ct=x.useRef(),Pt=x.useRef(!1),je=L(function(){return ct.current&&q===ut.current?ct.current:Q(z.getState(),q)},[z,ke,q]);qc(ig,[ut,lt,Pt,q,je,ct,ie]),qc(lg,[f,z,de,Q,ut,lt,Pt,ct,ie,it],[z,de,Q]);var fe=x.useMemo(function(){return x.createElement(R,ye({},je,{ref:H}))},[H,R,je]),Fe=x.useMemo(function(){return f?x.createElement(re.Provider,{value:le},fe):fe},[re,fe,le]);return Fe}var A=$?x.memo(Z):Z;if(A.WrappedComponent=R,A.displayName=Z.displayName=P,C){var ne=x.forwardRef(function(U,ae){return x.createElement(A,ye({},U,{reactReduxForwardedRef:ae}))});return ne.displayName=P,ne.WrappedComponent=R,Yc(ne,R)}return Yc(A,R)}}function Jc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ds(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 a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Jc(e[n[a]],t[n[a]]))return!1;return!0}function pg(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 a in e)r(a);return n}function ug(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 Zc(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Xc(e,t,n){ug(e)||Zc(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ps(e){return function(n,r){var a=e(n,r);function s(){return a}return s.dependsOnOwnProps=!1,s}}function Qc(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function ed(e,t){return function(r,a){var s=a.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=Qc(e);var f=l(p,m);return typeof f=="function"&&(l.mapToProps=f,l.dependsOnOwnProps=Qc(f),f=l(p,m)),process.env.NODE_ENV!=="production"&&Xc(f,s,t),f},l}}function mg(e){return typeof e=="function"?ed(e,"mapDispatchToProps"):void 0}function fg(e){return e?void 0:ps(function(t){return{dispatch:t}})}function hg(e){return e&&typeof e=="object"?ps(function(t){return pg(e,t)}):void 0}const Sg=[mg,fg,hg];function gg(e){return typeof e=="function"?ed(e,"mapStateToProps"):void 0}function bg(e){return e?void 0:ps(function(){return{}})}const vg=[gg,bg];function yg(e,t,n){return ye({},n,e,t)}function Tg(e){return function(n,r){var a=r.displayName,s=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(f,u,h){var S=e(f,u,h);return c?(!s||!l(S,p))&&(p=S):(c=!0,p=S,process.env.NODE_ENV!=="production"&&Xc(p,a,"mergeProps")),p}}}function Eg(e){return typeof e=="function"?Tg(e):void 0}function wg(e){return e?void 0:function(){return yg}}const Cg=[Eg,wg];function us(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||Zc("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function Dg(e,t,n,r){us(e,"mapStateToProps",r),us(t,"mapDispatchToProps",r),us(n,"mergeProps",r)}var Ng=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function kg(e,t,n,r){return function(s,l){return n(e(s,l),t(r,l),l)}}function Ig(e,t,n,r,a){var s=a.areStatesEqual,l=a.areOwnPropsEqual,c=a.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 C(){return e.dependsOnOwnProps&&(u=e(m,f)),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function E(){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=!s(M,m,I,f);return m=M,f=I,k&&V?T():k?C():V?E():S}return function(I,k){return p?N(I,k):y(I,k)}}function xg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,s=xo(t,Ng),l=n(e,s),c=r(e,s),p=a(e,s);process.env.NODE_ENV!=="production"&&Dg(l,c,p,s.displayName);var m=s.pure?Ig:kg;return m(l,c,p,e,s)}var Mg=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ms(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(s,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function _g(e,t){return e===t}function Lg(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?dg:n,a=t.mapStateToPropsFactories,s=a===void 0?vg:a,l=t.mapDispatchToPropsFactories,c=l===void 0?Sg:l,p=t.mergePropsFactories,m=p===void 0?Cg:p,f=t.selectorFactory,u=f===void 0?xg:f;return function(S,y,T,C){C===void 0&&(C={});var E=C,N=E.pure,M=N===void 0?!0:N,I=E.areStatesEqual,k=I===void 0?_g:I,V=E.areOwnPropsEqual,R=V===void 0?ds:V,w=E.areStatePropsEqual,P=w===void 0?ds:w,O=E.areMergedPropsEqual,$=O===void 0?ds:O,J=xo(E,Mg),L=ms(S,s,"mapStateToProps"),Z=ms(y,c,"mapDispatchToProps"),A=ms(T,m,"mergeProps");return r(u,ye({methodName:"connect",getDisplayName:function(Y){return"Connect("+Y+")"},shouldHandleStateChanges:!!S,initMapStateToProps:L,initMapDispatchToProps:Z,initMergeProps:A,pure:M,areStatesEqual:k,areOwnPropsEqual:R,areStatePropsEqual:P,areMergedPropsEqual:$},J))}}const td=Lg();HS(vo.unstable_batchedUpdates);function Og(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 nd(e,t){var n=x.useState(function(){return{inputs:t,result:e()}})[0],r=x.useRef(!0),a=x.useRef(n),s=r.current||!!(t&&a.current.inputs&&Og(t,a.current.inputs)),l=s?a.current:{inputs:t,result:e()};return x.useEffect(function(){r.current=!1,a.current=l},[l]),l.result}function Pg(e,t){return nd(function(){return e},t)}var Me=nd,ge=Pg,Rg=process.env.NODE_ENV==="production",fs="Invariant failed";function rd(e,t){if(Rg)throw new Error(fs);var n=typeof t=="function"?t():t,r=n?"".concat(fs,": ").concat(n):fs;throw new Error(r)}var At=function(t){var n=t.top,r=t.right,a=t.bottom,s=t.left,l=r-s,c=a-n,p={top:n,right:r,bottom:a,left:s,width:l,height:c,x:s,y:n,center:{x:(r+s)/2,y:(a+n)/2}};return p},hs=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},od=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Bg=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Ss={top:0,right:0,bottom:0,left:0},gs=function(t){var n=t.borderBox,r=t.margin,a=r===void 0?Ss:r,s=t.border,l=s===void 0?Ss:s,c=t.padding,p=c===void 0?Ss:c,m=At(hs(n,a)),f=At(od(n,l)),u=At(od(f,p));return{marginBox:m,borderBox:At(n),paddingBox:f,contentBox:u,margin:a,border:l,padding:p}},xt=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var a=Number(n);return isNaN(a)&&(process.env.NODE_ENV!=="production"?rd(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):rd()),a},Ag=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Mo=function(t,n){var r=t.borderBox,a=t.border,s=t.margin,l=t.padding,c=Bg(r,n);return gs({borderBox:c,border:a,margin:s,padding:l})},_o=function(t,n){return n===void 0&&(n=Ag()),Mo(t,n)},ad=function(t,n){var r={top:xt(n.marginTop),right:xt(n.marginRight),bottom:xt(n.marginBottom),left:xt(n.marginLeft)},a={top:xt(n.paddingTop),right:xt(n.paddingRight),bottom:xt(n.paddingBottom),left:xt(n.paddingLeft)},s={top:xt(n.borderTopWidth),right:xt(n.borderRightWidth),bottom:xt(n.borderBottomWidth),left:xt(n.borderLeftWidth)};return gs({borderBox:t,margin:r,padding:a,border:s})},sd=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return ad(n,r)},id=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Fg(e,t){return!!(e===t||id(e)&&id(t))}function Vg(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Fg(e[n],t[n]))return!1;return!0}function nt(e,t){t===void 0&&(t=Vg);var n,r=[],a,s=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return s&&n===this&&t(c,r)||(a=e.apply(this,c),s=!0,n=this,r=c),a}return l}var Vr=function(t){var n=[],r=null,a=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 a.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},a},$g=process.env.NODE_ENV==="production",Kg=/[ \t]{2,}/g,Hg=/^[ \t]*/gm,ld=function(t){return t.replace(Kg," ").replace(Hg,"").trim()},Wg=function(t){return ld(`
|
|
360
360
|
%creact-beautiful-dnd
|
|
361
361
|
|
|
362
362
|
%c`+ld(t)+`
|
|
363
363
|
|
|
364
364
|
%c👷 This is a development only message. It will be removed in production builds.
|
|
365
|
-
`)},Gg=function(t){return[Wg(t),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},Yg="__react-beautiful-dnd-disable-dev-warnings";function cd(e,t){var n;$g||typeof window<"u"&&window[Yg]||(n=console)[e].apply(n,Gg(t))}var We=cd.bind(null,"warn"),bs=cd.bind(null,"error");function bn(){}function Ug(e,t){return ye({},e,{},t)}function Mt(e,t,n){var r=t.map(function(a){var s=Ug(n,a.options);return e.addEventListener(a.eventName,a.fn,s),function(){e.removeEventListener(a.eventName,a.fn,s)}});return function(){r.forEach(function(s){s()})}}var zg=process.env.NODE_ENV==="production",dd="Invariant failed";function
|
|
365
|
+
`)},Gg=function(t){return[Wg(t),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},Yg="__react-beautiful-dnd-disable-dev-warnings";function cd(e,t){var n;$g||typeof window<"u"&&window[Yg]||(n=console)[e].apply(n,Gg(t))}var We=cd.bind(null,"warn"),bs=cd.bind(null,"error");function bn(){}function Ug(e,t){return ye({},e,{},t)}function Mt(e,t,n){var r=t.map(function(a){var s=Ug(n,a.options);return e.addEventListener(a.eventName,a.fn,s),function(){e.removeEventListener(a.eventName,a.fn,s)}});return function(){r.forEach(function(s){s()})}}var zg=process.env.NODE_ENV==="production",dd="Invariant failed";function $r(e){this.message=e}$r.prototype.toString=function(){return this.message};function K(e,t){throw zg?new $r(dd):new $r(dd+": "+(t||""))}var jg=function(e){gc(t,e);function t(){for(var r,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||this,r.callbacks=null,r.unbind=bn,r.onWindowError=function(c){var p=r.getCallbacks();p.isDragging()&&(p.tryAbort(),process.env.NODE_ENV!=="production"&&We(`
|
|
366
366
|
An error was caught by our window 'error' event listener while a drag was occurring.
|
|
367
367
|
The active drag has been aborted.
|
|
368
|
-
`));var m=c.error;m instanceof
|
|
368
|
+
`));var m=c.error;m instanceof $r&&(c.preventDefault(),process.env.NODE_ENV!=="production"&&bs(m.message))},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(c){r.callbacks=c},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=Mt(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(a){if(a instanceof $r){process.env.NODE_ENV!=="production"&&bs(a.message),this.setState({});return}throw a},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(x.Component),qg=`
|
|
369
369
|
Press space bar to start a drag.
|
|
370
370
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
371
371
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
@@ -401,18 +401,18 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
401
401
|
`:`
|
|
402
402
|
The item has been dropped while not over a drop area.
|
|
403
403
|
`+md(t.source)+`
|
|
404
|
-
`},Oo={dragHandleUsageInstructions:qg,onDragStart:Jg,onDragUpdate:Zg,onDragEnd:Xg},rt={x:0,y:0},st=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},wt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},vn=function(t,n){return t.x===n.x&&t.y===n.y},ur=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},$n=function(t,n,r){var a;return r===void 0&&(r=0),a={},a[t]=n,a[t==="x"?"y":"x"]=r,a},$r=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},fd=function(t,n){return Math.min.apply(Math,n.map(function(r){return $r(t,r)}))},hd=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},Qg=function(e,t){var n=At({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},Kr=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Sd=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},eb={top:0,right:0,bottom:0,left:0},tb=function(t,n){return n?Kr(t,n.scroll.diff.displacement):t},nb=function(t,n,r){if(r&&r.increasedBy){var a;return ye({},t,(a={},a[n.end]=t[n.end]+r.increasedBy[n.line],a))}return t},rb=function(t,n){return n&&n.shouldClipSubject?Qg(n.pageMarginBox,t):At(t)},mr=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,s=tb(t.marginBox,a),l=nb(s,r,n),c=rb(l,a);return{page:t,withPlaceholder:n,active:c}},vs=function(e,t){e.frame||(process.env.NODE_ENV,K());var n=e.frame,r=wt(t,n.scroll.initial),a=ur(r),s=ye({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}}),l=mr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s}),c=ye({},e,{frame:s,subject:l});return c};function ob(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Po(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function ys(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function yn(e,t){if(e.find)return e.find(t);var n=ys(e,t);if(n!==-1)return e[n]}function gd(e){return Array.prototype.slice.call(e)}var bd=nt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),vd=nt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Ro=nt(function(e){return Po(e)}),ab=nt(function(e){return Po(e)}),Kn=nt(function(e,t){var n=ab(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,a){return r.descriptor.index-a.descriptor.index});return n});function Ts(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Bo(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Ao=nt(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),sb=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.previousImpact;if(!r.isCombineEnabled)return null;var l=Ts(s);if(!l)return null;function c(T){var C={type:"COMBINE",combine:{draggableId:T,droppableId:r.descriptor.id}};return ye({},s,{at:C})}var p=s.displaced.all,m=p.length?p[0]:null;if(t)return m?c(m):null;var f=Ao(n,a);if(!m){if(!f.length)return null;var u=f[f.length-1];return c(u.descriptor.id)}var h=ys(f,function(T){return T.descriptor.id===m});h===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find displaced item in set"):K());var S=h-1;if(S<0)return null;var y=f[S];return c(y.descriptor.id)},fr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},yd={point:rt,value:0},Hr={invisible:{},visible:{},all:[]},ib={displaced:Hr,displacedBy:yd,at:null},_t=function(e,t){return function(n){return e<=n&&n<=t}},Td=function(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(a)return!0;var s=t(r.top)||t(r.bottom),l=n(r.left)||n(r.right),c=s&&l;if(c)return!0;var p=r.top<e.top&&r.bottom>e.bottom,m=r.left<e.left&&r.right>e.right,f=p&&m;if(f)return!0;var u=p&&l||m&&s;return u}},lb=function(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return a}},Es={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Ed={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},cb=function(e){return function(t){var n=_t(t.top,t.bottom),r=_t(t.left,t.right);return function(a){return e===Es?n(a.top)&&n(a.bottom):r(a.left)&&r(a.right)}}},db=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:rt;return Kr(t,r)},pb=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},ub=function(t,n,r){return r(n)(t)},ws=function(t){var n=t.target,r=t.destination,a=t.viewport,s=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=s?db(n,r):n;return pb(c,r,l)&&ub(c,a,l)},mb=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:Td}))},wd=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:lb}))},fb=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:cb(t.destination.axis)}))},hb=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var a=n.invisible,s=n.visible;if(a[t])return!1;var l=s[t];return l?l.shouldAnimate:!0};function Sb(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return At(hs(n,r))}function Wr(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,a=e.viewport,s=e.forceShouldAnimate,l=e.last;return t.reduce(function(p,m){var f=Sb(m,r),u=m.descriptor.id;p.all.push(u);var h=mb({target:f,destination:n,viewport:a,withDroppableDisplacement:!0});if(!h)return p.invisible[m.descriptor.id]=!0,p;var S=hb(u,l,s),y={draggableId:u,shouldAnimate:S};return p.visible[u]=y,p},{all:[],visible:{},invisible:{}})}function gb(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function Cd(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,a=e.destination,s=gb(t,{inHomeList:n});return{displaced:Hr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:s}}}}function Fo(e){var t=e.draggable,n=e.insideDestination,r=e.destination,a=e.viewport,s=e.displacedBy,l=e.last,c=e.index,p=e.forceShouldAnimate,m=fr(t,r);if(c==null)return Cd({insideDestination:n,inHomeList:m,displacedBy:s,destination:r});var f=yn(n,function(T){return T.descriptor.index===c});if(!f)return Cd({insideDestination:n,inHomeList:m,displacedBy:s,destination:r});var u=Ao(t,n),h=n.indexOf(f),S=u.slice(h),y=Wr({afterDragging:S,destination:r,displacedBy:s,last:l,viewport:a.frame,forceShouldAnimate:p});return{displaced:y,displacedBy:s,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:c}}}}function Tn(e,t){return!!t.effected[e]}var bb=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,a=e.combine,s=e.afterCritical;if(!n.isCombineEnabled)return null;var l=a.draggableId,c=r[l],p=c.descriptor.index,m=Tn(l,s);return m?t?p:p-1:t?p+1:p},vb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,a=e.location;if(!r.length)return null;var s=a.index,l=t?s+1:s-1,c=r[0].descriptor.index,p=r[r.length-1].descriptor.index,m=n?p:p+1;return l<c||l>m?null:l},yb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,a=e.draggables,s=e.destination,l=e.insideDestination,c=e.previousImpact,p=e.viewport,m=e.afterCritical,f=c.at;if(f||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move in direction without previous impact location"):K()),f.type==="REORDER"){var u=vb({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:l});return u==null?null:Fo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=bb({isMovingForward:t,destination:s,displaced:c.displaced,draggables:a,combine:f.combine,afterCritical:m});return h==null?null:Fo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},Tb=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,s=!!(t.visible[r]||t.invisible[r]);return Tn(r,n)?s?rt:ur(a.point):s?a.point:rt},Eb=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=Bo(n);a||(process.env.NODE_ENV,K());var s=a.draggableId,l=r[s].page.borderBox.center,c=Tb({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy});return st(l,c)},Dd=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},wb=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Cs=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},Nd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.end]+Dd(n,a),Cs(n,r.marginBox,a))},kd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.start]-wb(n,a),Cs(n,r.marginBox,a))},Cb=function(t){var n=t.axis,r=t.moveInto,a=t.isMoving;return $n(n.line,r.contentBox[n.start]+Dd(n,a),Cs(n,r.contentBox,a))},Db=function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,s=e.afterCritical,l=Kn(a.descriptor.id,r),c=n.page,p=a.axis;if(!l.length)return Cb({axis:p,moveInto:a.page,isMoving:c});var m=t.displaced,f=t.displacedBy,u=m.all[0];if(u){var h=r[u];if(Tn(u,s))return kd({axis:p,moveRelativeTo:h.page,isMoving:c});var S=Mo(h.page,f.point);return kd({axis:p,moveRelativeTo:S,isMoving:c})}var y=l[l.length-1];if(y.descriptor.id===n.descriptor.id)return c.borderBox.center;if(Tn(y.descriptor.id,s)){var T=Mo(y.page,ur(s.displacedBy.point));return Nd({axis:p,moveRelativeTo:T,isMoving:c})}return Nd({axis:p,moveRelativeTo:y.page,isMoving:c})},Ds=function(e,t){var n=e.frame;return n?st(t,n.scroll.diff.displacement):t},Nb=function(t){var n=t.impact,r=t.draggable,a=t.droppable,s=t.draggables,l=t.afterCritical,c=r.page.borderBox.center,p=n.at;return!a||!p?c:p.type==="REORDER"?Db({impact:n,draggable:r,draggables:s,droppable:a,afterCritical:l}):Eb({impact:n,draggables:s,afterCritical:l})},Vo=function(e){var t=Nb(e),n=e.droppable,r=n?Ds(n,t):t;return r},Id=function(e,t){var n=wt(t,e.scroll.initial),r=ur(n),a=At({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),s={frame:a,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return s};function xd(e,t){return e.map(function(n){return t[n]})}function kb(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var Ib=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,s=e.maxScrollChange,l=Id(n,st(n.scroll.current,s)),c=r.frame?vs(r,st(r.frame.scroll.current,s)):r,p=t.displaced,m=Wr({afterDragging:xd(p.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),f=Wr({afterDragging:xd(p.all,a),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},S=[p,m,f];p.all.forEach(function(T){var C=kb(T,S);if(C){h[T]=C;return}u[T]=!0});var y=ye({},t,{displaced:{all:p.all,invisible:u,visible:h}});return y},xb=function(e,t){return st(e.scroll.diff.displacement,t)},Ns=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,a=xb(r,t),s=wt(a,n.page.borderBox.center);return st(n.client.borderBox.center,s)},Md=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,a=e.viewport,s=e.withDroppableDisplacement,l=e.onlyOnMainAxis,c=l===void 0?!1:l,p=wt(r,t.page.borderBox.center),m=Kr(t.page.borderBox,p),f={target:m,destination:n,withDroppableDisplacement:s,viewport:a};return c?fb(f):wd(f)},Mb=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.draggables,s=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,p=e.previousClientSelection,m=e.afterCritical;if(!r.isEnabled)return null;var f=Kn(r.descriptor.id,a),u=fr(n,r),h=sb({isMovingForward:t,draggable:n,destination:r,insideDestination:f,previousImpact:s})||yb({isMovingForward:t,isInHomeList:u,draggable:n,draggables:a,destination:r,insideDestination:f,previousImpact:s,viewport:l,afterCritical:m});if(!h)return null;var S=Vo({impact:h,draggable:n,droppable:r,draggables:a,afterCritical:m}),y=Md({draggable:n,destination:r,newPageBorderBoxCenter:S,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(y){var T=Ns({pageBorderBoxCenter:S,draggable:n,viewport:l});return{clientSelection:T,impact:h,scrollJumpRequest:null}}var C=wt(S,c),E=Ib({impact:h,viewport:l,destination:r,draggables:a,maxScrollChange:C});return{clientSelection:p,impact:E,scrollJumpRequest:C}},ht=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get clipped area from droppable"):K()),n},_b=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,a=e.droppables,s=e.viewport,l=r.subject.active;if(!l)return null;var c=r.axis,p=_t(l[c.start],l[c.end]),m=Ro(a).filter(function(u){return u!==r}).filter(function(u){return u.isEnabled}).filter(function(u){return!!u.subject.active}).filter(function(u){return Td(s.frame)(ht(u))}).filter(function(u){var h=ht(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=ht(u),S=_t(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||S(l[c.start])||S(l[c.end])}).sort(function(u,h){var S=ht(u)[c.crossAxisStart],y=ht(h)[c.crossAxisStart];return t?S-y:y-S}).filter(function(u,h,S){return ht(u)[c.crossAxisStart]===ht(S[0])[c.crossAxisStart]});if(!m.length)return null;if(m.length===1)return m[0];var f=m.filter(function(u){var h=_t(ht(u)[c.start],ht(u)[c.end]);return h(n[c.line])});return f.length===1?f[0]:f.length>1?f.sort(function(u,h){return ht(u)[c.start]-ht(h)[c.start]})[0]:m.sort(function(u,h){var S=fd(n,Sd(ht(u))),y=fd(n,Sd(ht(h)));return S!==y?S-y:ht(u)[c.start]-ht(h)[c.start]})[0]},_d=function(t,n){var r=t.page.borderBox.center;return Tn(t.descriptor.id,n)?wt(r,n.displacedBy.point):r},Lb=function(t,n){var r=t.page.borderBox;return Tn(t.descriptor.id,n)?Kr(r,ur(n.displacedBy.point)):r},Ob=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,a=e.insideDestination,s=e.afterCritical,l=a.filter(function(c){return wd({target:Lb(c,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var m=$r(t,Ds(r,_d(c,s))),f=$r(t,Ds(r,_d(p,s)));return m<f?-1:f<m?1:c.descriptor.index-p.descriptor.index});return l[0]||null},Gr=nt(function(t,n){var r=n[t.line];return{value:r,point:$n(t.line,r)}}),Pb=function(t,n,r){var a=t.axis;if(t.descriptor.mode==="virtual")return $n(a.line,n[a.line]);var s=t.subject.page.contentBox[a.size],l=Kn(t.descriptor.id,r),c=l.reduce(function(f,u){return f+u.client.marginBox[a.size]},0),p=c+n[a.line],m=p-s;return m<=0?null:$n(a.line,m)},Ld=function(t,n){return ye({},t,{scroll:ye({},t.scroll,{max:n})})},Od=function(t,n,r){var a=t.frame;fr(n,t)&&(process.env.NODE_ENV!=="production"?K(!1,"Should not add placeholder space to home list"):K()),t.subject.withPlaceholder&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot add placeholder size to a subject when it already has one"):K());var s=Gr(t.axis,n.displaceBy).point,l=Pb(t,s,r),c={placeholderSize:s,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var p=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return ye({},t,{subject:p})}var m=l?st(a.scroll.max,l):a.scroll.max,f=Ld(a,m),u=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:f});return ye({},t,{subject:u,frame:f})},Rb=function(t){var n=t.subject.withPlaceholder;n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot remove placeholder form subject when there was none"):K());var r=t.frame;if(!r){var a=mr({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ye({},t,{subject:a})}var s=n.oldFrameMaxScroll;s||(process.env.NODE_ENV!=="production"?K(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder"):K());var l=Ld(r,s),c=mr({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return ye({},t,{subject:c,frame:l})},Bb=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,a=e.draggable,s=e.draggables,l=e.destination,c=e.viewport,p=e.afterCritical;if(!n){if(r.length)return null;var m={displaced:Hr,displacedBy:yd,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},f=Vo({impact:m,draggable:a,droppable:l,draggables:s,afterCritical:p}),u=fr(a,l)?l:Od(l,a,s),h=Md({draggable:a,destination:u,newPageBorderBoxCenter:f,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?m:null}var S=t[l.axis.line]<=n.page.borderBox.center[l.axis.line],y=function(){var C=n.descriptor.index;return n.descriptor.id===a.descriptor.id||S?C:C+1}(),T=Gr(l.axis,a.displaceBy);return Fo({draggable:a,insideDestination:r,destination:l,viewport:c,displacedBy:T,last:Hr,index:y})},Ab=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,a=e.isOver,s=e.draggables,l=e.droppables,c=e.viewport,p=e.afterCritical,m=_b({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:l,viewport:c});if(!m)return null;var f=Kn(m.descriptor.id,s),u=Ob({pageBorderBoxCenter:n,viewport:c,destination:m,insideDestination:f,afterCritical:p}),h=Bb({previousPageBorderBoxCenter:n,destination:m,draggable:r,draggables:s,moveRelativeTo:u,insideDestination:f,viewport:c,afterCritical:p});if(!h)return null;var S=Vo({impact:h,draggable:r,droppable:m,draggables:s,afterCritical:p}),y=Ns({pageBorderBoxCenter:S,draggable:r,viewport:c});return{clientSelection:y,impact:h,scrollJumpRequest:null}},Ct=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},Fb=function(t,n){var r=Ct(t);return r?n[r]:null},Vb=function(e){var t=e.state,n=e.type,r=Fb(t.impact,t.dimensions.droppables),a=!!r,s=t.dimensions.droppables[t.critical.droppable.id],l=r||s,c=l.axis.direction,p=c==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||c==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(p&&!a)return null;var m=n==="MOVE_DOWN"||n==="MOVE_RIGHT",f=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,h=t.dimensions,S=h.draggables,y=h.droppables;return p?Mb({isMovingForward:m,previousPageBorderBoxCenter:u,draggable:f,destination:l,draggables:S,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Ab({isMovingForward:m,previousPageBorderBoxCenter:u,draggable:f,isOver:l,draggables:S,droppables:y,viewport:t.viewport,afterCritical:t.afterCritical})};function Hn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Pd(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(a){return t(a.y)&&n(a.x)}}function $b(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Kb(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,a=n.page.borderBox.center,s=r.map(function(l){var c=l.axis,p=$n(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:$r(a,p)}}).sort(function(l,c){return c.distance-l.distance});return s[0]?s[0].id:null}function Hb(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,a=Ro(r).filter(function(s){if(!s.isEnabled)return!1;var l=s.subject.active;if(!l||!$b(t,l))return!1;if(Pd(l)(t.center))return!0;var c=s.axis,p=l.center[c.crossAxisLine],m=t[c.crossAxisStart],f=t[c.crossAxisEnd],u=_t(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(m),S=u(f);return!h&&!S?!0:h?m<p:f>p});return a.length?a.length===1?a[0].descriptor.id:Kb({pageBorderBox:t,draggable:n,candidates:a}):null}var Rd=function(t,n){return At(Kr(t,n))},Wb=function(e,t){var n=e.frame;return n?Rd(t,n.scroll.diff.value):t};function Bd(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function Gb(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var Yb=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.last,l=e.viewport,c=e.afterCritical,p=r.axis,m=Gr(r.axis,n.displaceBy),f=m.value,u=t[p.start],h=t[p.end],S=Ao(n,a),y=yn(S,function(C){var E=C.descriptor.id,N=C.page.borderBox.center[p.line],M=Tn(E,c),I=Bd({displaced:s,id:E});return M?I?h<=N:u<N-f:I?h<=N+f:u<N}),T=Gb({draggable:n,closest:y,inHomeList:fr(n,r)});return Fo({draggable:n,insideDestination:a,destination:r,viewport:l,last:s,displacedBy:m,index:T})},Ub=4,zb=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,a=e.destination,s=e.insideDestination,l=e.afterCritical;if(!a.isCombineEnabled)return null;var c=a.axis,p=Gr(a.axis,t.displaceBy),m=p.value,f=n[c.start],u=n[c.end],h=Ao(t,s),S=yn(h,function(T){var C=T.descriptor.id,E=T.page.borderBox,N=E[c.size],M=N/Ub,I=Tn(C,l),k=Bd({displaced:r.displaced,id:C});return I?k?u>E[c.start]+M&&u<E[c.end]-M:f>E[c.start]-m+M&&f<E[c.end]-m-M:k?u>E[c.start]+m+M&&u<E[c.end]+m-M:f>E[c.start]+M&&f<E[c.end]-M});if(!S)return null;var y={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:S.descriptor.id,droppableId:a.descriptor.id}}};return y},Ad=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,a=e.droppables,s=e.previousImpact,l=e.viewport,c=e.afterCritical,p=Rd(n.page.borderBox,t),m=Hb({pageBorderBox:p,draggable:n,droppables:a});if(!m)return ib;var f=a[m],u=Kn(f.descriptor.id,r),h=Wb(f,p);return zb({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:s,destination:f,insideDestination:u,afterCritical:c})||Yb({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:f,insideDestination:u,last:s.displaced,viewport:l,afterCritical:c})},ks=function(e,t){var n;return ye({},e,(n={},n[t.descriptor.id]=t,n))},jb=function(t){var n=t.previousImpact,r=t.impact,a=t.droppables,s=Ct(n),l=Ct(r);if(!s||s===l)return a;var c=a[s];if(!c.subject.withPlaceholder)return a;var p=Rb(c);return ks(a,p)},qb=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,a=e.previousImpact,s=e.impact,l=jb({previousImpact:a,impact:s,droppables:r}),c=Ct(s);if(!c)return l;var p=r[c];if(fr(t,p)||p.subject.withPlaceholder)return l;var m=Od(p,t,n);return ks(l,m)},Yr=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,a=e.viewport,s=e.impact,l=e.scrollJumpRequest,c=a||t.viewport,p=r||t.dimensions,m=n||t.current.client.selection,f=wt(m,t.initial.client.selection),u={offset:f,selection:m,borderBoxCenter:st(t.initial.client.borderBoxCenter,f)},h={selection:st(u.selection,c.scroll.current),borderBoxCenter:st(u.borderBoxCenter,c.scroll.current),offset:st(u.offset,c.scroll.diff.value)},S={client:u,page:h};if(t.phase==="COLLECTING")return ye({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:S});var y=p.draggables[t.critical.draggable.id],T=s||Ad({pageOffset:h.offset,draggable:y,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),C=qb({draggable:y,impact:T,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),E=ye({},t,{current:S,dimensions:{draggables:p.draggables,droppables:C},impact:T,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return E};function Jb(e,t){return e.map(function(n){return t[n]})}var Fd=function(e){var t=e.impact,n=e.viewport,r=e.draggables,a=e.destination,s=e.forceShouldAnimate,l=t.displaced,c=Jb(l.all,r),p=Wr({afterDragging:c,destination:a,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:s,last:l});return ye({},t,{displaced:p})},Vd=function(e){var t=e.impact,n=e.draggable,r=e.droppable,a=e.draggables,s=e.viewport,l=e.afterCritical,c=Vo({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:l});return Ns({pageBorderBoxCenter:c,draggable:n,viewport:s})},$d=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&(process.env.NODE_ENV,K());var a=t.impact,s=r||t.viewport,l=n||t.dimensions,c=l.draggables,p=l.droppables,m=c[t.critical.draggable.id],f=Ct(a);f||(process.env.NODE_ENV!=="production"?K(!1,"Must be over a destination in SNAP movement mode"):K());var u=p[f],h=Fd({impact:a,viewport:s,destination:u,draggables:c}),S=Vd({impact:h,draggable:m,droppable:u,draggables:c,viewport:s,afterCritical:t.afterCritical});return Yr({impact:h,clientSelection:S,state:t,dimensions:l,viewport:s})},Zb=function(e){return{index:e.index,droppableId:e.droppableId}},Kd=function(e){var t=e.draggable,n=e.home,r=e.draggables,a=e.viewport,s=Gr(n.axis,t.displaceBy),l=Kn(n.descriptor.id,r),c=l.indexOf(t);c===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Expected draggable to be inside home list"):K());var p=l.slice(c+1),m=p.reduce(function(S,y){return S[y.descriptor.id]=!0,S},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:s,effected:m},u=Wr({afterDragging:p,destination:n,displacedBy:s,last:null,viewport:a.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:s,at:{type:"REORDER",destination:Zb(t.descriptor)}};return{impact:h,afterCritical:f}},Xb=function(e,t){return{draggables:e.draggables,droppables:ks(e.droppables,t)}},Ur=function(t){process.env.NODE_ENV},zr=function(t){process.env.NODE_ENV},Qb=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,a=Mo(t.client,n),s=_o(a,r),l=ye({},t,{placeholder:ye({},t.placeholder,{client:a}),client:a,page:s});return l},ev=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?K(!1,"Expected Droppable to have a frame"):K()),t},tv=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,a=r.scroll.diff.value;return t.map(function(s){var l=s.descriptor.droppableId,c=n[l],p=ev(c),m=p.scroll.diff.value,f=st(a,m),u=Qb({draggable:s,offset:f,initialWindowScroll:r.scroll.initial});return u})},nv=function(e){var t=e.state,n=e.published;Ur();var r=n.modified.map(function(M){var I=t.dimensions.droppables[M.droppableId],k=vs(I,M.scroll);return k}),a=ye({},t.dimensions.droppables,{},bd(r)),s=vd(tv({additions:n.additions,updatedDroppables:a,viewport:t.viewport})),l=ye({},t.dimensions.draggables,{},s);n.removals.forEach(function(M){delete l[M]});var c={droppables:a,draggables:l},p=Ct(t.impact),m=p?c.droppables[p]:null,f=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=Kd({draggable:f,home:u,draggables:l,viewport:t.viewport}),S=h.impact,y=h.afterCritical,T=m&&m.isCombineEnabled?t.impact:S,C=Ad({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:T,viewport:t.viewport,afterCritical:y});zr();var E=ye({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:C,onLiftImpact:S,dimensions:c,afterCritical:y,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return E;var N=ye({phase:"DROP_PENDING"},E,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return N},Is=function(t){return t.movementMode==="SNAP"},xs=function(t,n,r){var a=Xb(t.dimensions,n);return!Is(t)||r?Yr({state:t,dimensions:a}):$d({state:t,dimensions:a})};function Ms(e){return e.isDragging&&e.movementMode==="SNAP"?ye({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Hd={phase:"IDLE",completed:null,shouldFlush:!1},rv=function(e,t){if(e===void 0&&(e=Hd),t.type==="FLUSH")return ye({},Hd,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"INITIAL_PUBLISH must come after a IDLE phase"):K());var n=t.payload,r=n.critical,a=n.clientSelection,s=n.viewport,l=n.dimensions,c=n.movementMode,p=l.draggables[r.draggable.id],m=l.droppables[r.droppable.id],f={selection:a,borderBoxCenter:p.client.borderBox.center,offset:rt},u={client:f,page:{selection:st(f.selection,s.scroll.initial),borderBoxCenter:st(f.selection,s.scroll.initial),offset:st(f.selection,s.scroll.diff.value)}},h=Ro(l.droppables).every(function(le){return!le.isFixedOnPage}),S=Kd({draggable:p,home:m,draggables:l.draggables,viewport:s}),y=S.impact,T=S.afterCritical,C={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:y,afterCritical:T,onLiftImpact:y,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null};return C}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,"Collection cannot start from phase "+e.phase):K());var E=ye({phase:"COLLECTING"},e,{phase:"COLLECTING"});return E}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Unexpected "+t.type+" received in phase "+e.phase):K()),nv({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var N=t.payload.client;return vn(N,e.current.client.selection)?e:Yr({state:e,clientSelection:N,impact:Is(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Ms(e);Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var M=t.payload,I=M.id,k=M.newScroll,V=e.dimensions.droppables[I];if(!V)return e;var R=vs(V,k);return xs(e,R,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var w=t.payload,P=w.id,O=w.isEnabled,$=e.dimensions.droppables[P];$||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+P+"] to toggle its enabled state"):K()),$.isEnabled===O&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isEnabled to "+String(O)+`
|
|
404
|
+
`},Oo={dragHandleUsageInstructions:qg,onDragStart:Jg,onDragUpdate:Zg,onDragEnd:Xg},rt={x:0,y:0},st=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},wt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},vn=function(t,n){return t.x===n.x&&t.y===n.y},ur=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},$n=function(t,n,r){var a;return r===void 0&&(r=0),a={},a[t]=n,a[t==="x"?"y":"x"]=r,a},Kr=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},fd=function(t,n){return Math.min.apply(Math,n.map(function(r){return Kr(t,r)}))},hd=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},Qg=function(e,t){var n=At({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},Hr=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Sd=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},eb={top:0,right:0,bottom:0,left:0},tb=function(t,n){return n?Hr(t,n.scroll.diff.displacement):t},nb=function(t,n,r){if(r&&r.increasedBy){var a;return ye({},t,(a={},a[n.end]=t[n.end]+r.increasedBy[n.line],a))}return t},rb=function(t,n){return n&&n.shouldClipSubject?Qg(n.pageMarginBox,t):At(t)},mr=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,s=tb(t.marginBox,a),l=nb(s,r,n),c=rb(l,a);return{page:t,withPlaceholder:n,active:c}},vs=function(e,t){e.frame||(process.env.NODE_ENV,K());var n=e.frame,r=wt(t,n.scroll.initial),a=ur(r),s=ye({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}}),l=mr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s}),c=ye({},e,{frame:s,subject:l});return c};function ob(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Po(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function ys(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function yn(e,t){if(e.find)return e.find(t);var n=ys(e,t);if(n!==-1)return e[n]}function gd(e){return Array.prototype.slice.call(e)}var bd=nt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),vd=nt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Ro=nt(function(e){return Po(e)}),ab=nt(function(e){return Po(e)}),Kn=nt(function(e,t){var n=ab(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,a){return r.descriptor.index-a.descriptor.index});return n});function Ts(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Bo(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Ao=nt(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),sb=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.previousImpact;if(!r.isCombineEnabled)return null;var l=Ts(s);if(!l)return null;function c(T){var C={type:"COMBINE",combine:{draggableId:T,droppableId:r.descriptor.id}};return ye({},s,{at:C})}var p=s.displaced.all,m=p.length?p[0]:null;if(t)return m?c(m):null;var f=Ao(n,a);if(!m){if(!f.length)return null;var u=f[f.length-1];return c(u.descriptor.id)}var h=ys(f,function(T){return T.descriptor.id===m});h===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find displaced item in set"):K());var S=h-1;if(S<0)return null;var y=f[S];return c(y.descriptor.id)},fr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},yd={point:rt,value:0},Wr={invisible:{},visible:{},all:[]},ib={displaced:Wr,displacedBy:yd,at:null},_t=function(e,t){return function(n){return e<=n&&n<=t}},Td=function(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(a)return!0;var s=t(r.top)||t(r.bottom),l=n(r.left)||n(r.right),c=s&&l;if(c)return!0;var p=r.top<e.top&&r.bottom>e.bottom,m=r.left<e.left&&r.right>e.right,f=p&&m;if(f)return!0;var u=p&&l||m&&s;return u}},lb=function(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return a}},Es={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Ed={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},cb=function(e){return function(t){var n=_t(t.top,t.bottom),r=_t(t.left,t.right);return function(a){return e===Es?n(a.top)&&n(a.bottom):r(a.left)&&r(a.right)}}},db=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:rt;return Hr(t,r)},pb=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},ub=function(t,n,r){return r(n)(t)},ws=function(t){var n=t.target,r=t.destination,a=t.viewport,s=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=s?db(n,r):n;return pb(c,r,l)&&ub(c,a,l)},mb=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:Td}))},wd=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:lb}))},fb=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:cb(t.destination.axis)}))},hb=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var a=n.invisible,s=n.visible;if(a[t])return!1;var l=s[t];return l?l.shouldAnimate:!0};function Sb(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return At(hs(n,r))}function Gr(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,a=e.viewport,s=e.forceShouldAnimate,l=e.last;return t.reduce(function(p,m){var f=Sb(m,r),u=m.descriptor.id;p.all.push(u);var h=mb({target:f,destination:n,viewport:a,withDroppableDisplacement:!0});if(!h)return p.invisible[m.descriptor.id]=!0,p;var S=hb(u,l,s),y={draggableId:u,shouldAnimate:S};return p.visible[u]=y,p},{all:[],visible:{},invisible:{}})}function gb(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function Cd(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,a=e.destination,s=gb(t,{inHomeList:n});return{displaced:Wr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:s}}}}function Fo(e){var t=e.draggable,n=e.insideDestination,r=e.destination,a=e.viewport,s=e.displacedBy,l=e.last,c=e.index,p=e.forceShouldAnimate,m=fr(t,r);if(c==null)return Cd({insideDestination:n,inHomeList:m,displacedBy:s,destination:r});var f=yn(n,function(T){return T.descriptor.index===c});if(!f)return Cd({insideDestination:n,inHomeList:m,displacedBy:s,destination:r});var u=Ao(t,n),h=n.indexOf(f),S=u.slice(h),y=Gr({afterDragging:S,destination:r,displacedBy:s,last:l,viewport:a.frame,forceShouldAnimate:p});return{displaced:y,displacedBy:s,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:c}}}}function Tn(e,t){return!!t.effected[e]}var bb=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,a=e.combine,s=e.afterCritical;if(!n.isCombineEnabled)return null;var l=a.draggableId,c=r[l],p=c.descriptor.index,m=Tn(l,s);return m?t?p:p-1:t?p+1:p},vb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,a=e.location;if(!r.length)return null;var s=a.index,l=t?s+1:s-1,c=r[0].descriptor.index,p=r[r.length-1].descriptor.index,m=n?p:p+1;return l<c||l>m?null:l},yb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,a=e.draggables,s=e.destination,l=e.insideDestination,c=e.previousImpact,p=e.viewport,m=e.afterCritical,f=c.at;if(f||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move in direction without previous impact location"):K()),f.type==="REORDER"){var u=vb({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:l});return u==null?null:Fo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=bb({isMovingForward:t,destination:s,displaced:c.displaced,draggables:a,combine:f.combine,afterCritical:m});return h==null?null:Fo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},Tb=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,s=!!(t.visible[r]||t.invisible[r]);return Tn(r,n)?s?rt:ur(a.point):s?a.point:rt},Eb=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=Bo(n);a||(process.env.NODE_ENV,K());var s=a.draggableId,l=r[s].page.borderBox.center,c=Tb({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy});return st(l,c)},Dd=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},wb=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Cs=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},Nd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.end]+Dd(n,a),Cs(n,r.marginBox,a))},kd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.start]-wb(n,a),Cs(n,r.marginBox,a))},Cb=function(t){var n=t.axis,r=t.moveInto,a=t.isMoving;return $n(n.line,r.contentBox[n.start]+Dd(n,a),Cs(n,r.contentBox,a))},Db=function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,s=e.afterCritical,l=Kn(a.descriptor.id,r),c=n.page,p=a.axis;if(!l.length)return Cb({axis:p,moveInto:a.page,isMoving:c});var m=t.displaced,f=t.displacedBy,u=m.all[0];if(u){var h=r[u];if(Tn(u,s))return kd({axis:p,moveRelativeTo:h.page,isMoving:c});var S=Mo(h.page,f.point);return kd({axis:p,moveRelativeTo:S,isMoving:c})}var y=l[l.length-1];if(y.descriptor.id===n.descriptor.id)return c.borderBox.center;if(Tn(y.descriptor.id,s)){var T=Mo(y.page,ur(s.displacedBy.point));return Nd({axis:p,moveRelativeTo:T,isMoving:c})}return Nd({axis:p,moveRelativeTo:y.page,isMoving:c})},Ds=function(e,t){var n=e.frame;return n?st(t,n.scroll.diff.displacement):t},Nb=function(t){var n=t.impact,r=t.draggable,a=t.droppable,s=t.draggables,l=t.afterCritical,c=r.page.borderBox.center,p=n.at;return!a||!p?c:p.type==="REORDER"?Db({impact:n,draggable:r,draggables:s,droppable:a,afterCritical:l}):Eb({impact:n,draggables:s,afterCritical:l})},Vo=function(e){var t=Nb(e),n=e.droppable,r=n?Ds(n,t):t;return r},Id=function(e,t){var n=wt(t,e.scroll.initial),r=ur(n),a=At({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),s={frame:a,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return s};function xd(e,t){return e.map(function(n){return t[n]})}function kb(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var Ib=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,s=e.maxScrollChange,l=Id(n,st(n.scroll.current,s)),c=r.frame?vs(r,st(r.frame.scroll.current,s)):r,p=t.displaced,m=Gr({afterDragging:xd(p.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),f=Gr({afterDragging:xd(p.all,a),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},S=[p,m,f];p.all.forEach(function(T){var C=kb(T,S);if(C){h[T]=C;return}u[T]=!0});var y=ye({},t,{displaced:{all:p.all,invisible:u,visible:h}});return y},xb=function(e,t){return st(e.scroll.diff.displacement,t)},Ns=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,a=xb(r,t),s=wt(a,n.page.borderBox.center);return st(n.client.borderBox.center,s)},Md=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,a=e.viewport,s=e.withDroppableDisplacement,l=e.onlyOnMainAxis,c=l===void 0?!1:l,p=wt(r,t.page.borderBox.center),m=Hr(t.page.borderBox,p),f={target:m,destination:n,withDroppableDisplacement:s,viewport:a};return c?fb(f):wd(f)},Mb=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.draggables,s=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,p=e.previousClientSelection,m=e.afterCritical;if(!r.isEnabled)return null;var f=Kn(r.descriptor.id,a),u=fr(n,r),h=sb({isMovingForward:t,draggable:n,destination:r,insideDestination:f,previousImpact:s})||yb({isMovingForward:t,isInHomeList:u,draggable:n,draggables:a,destination:r,insideDestination:f,previousImpact:s,viewport:l,afterCritical:m});if(!h)return null;var S=Vo({impact:h,draggable:n,droppable:r,draggables:a,afterCritical:m}),y=Md({draggable:n,destination:r,newPageBorderBoxCenter:S,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(y){var T=Ns({pageBorderBoxCenter:S,draggable:n,viewport:l});return{clientSelection:T,impact:h,scrollJumpRequest:null}}var C=wt(S,c),E=Ib({impact:h,viewport:l,destination:r,draggables:a,maxScrollChange:C});return{clientSelection:p,impact:E,scrollJumpRequest:C}},ht=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get clipped area from droppable"):K()),n},_b=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,a=e.droppables,s=e.viewport,l=r.subject.active;if(!l)return null;var c=r.axis,p=_t(l[c.start],l[c.end]),m=Ro(a).filter(function(u){return u!==r}).filter(function(u){return u.isEnabled}).filter(function(u){return!!u.subject.active}).filter(function(u){return Td(s.frame)(ht(u))}).filter(function(u){var h=ht(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=ht(u),S=_t(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||S(l[c.start])||S(l[c.end])}).sort(function(u,h){var S=ht(u)[c.crossAxisStart],y=ht(h)[c.crossAxisStart];return t?S-y:y-S}).filter(function(u,h,S){return ht(u)[c.crossAxisStart]===ht(S[0])[c.crossAxisStart]});if(!m.length)return null;if(m.length===1)return m[0];var f=m.filter(function(u){var h=_t(ht(u)[c.start],ht(u)[c.end]);return h(n[c.line])});return f.length===1?f[0]:f.length>1?f.sort(function(u,h){return ht(u)[c.start]-ht(h)[c.start]})[0]:m.sort(function(u,h){var S=fd(n,Sd(ht(u))),y=fd(n,Sd(ht(h)));return S!==y?S-y:ht(u)[c.start]-ht(h)[c.start]})[0]},_d=function(t,n){var r=t.page.borderBox.center;return Tn(t.descriptor.id,n)?wt(r,n.displacedBy.point):r},Lb=function(t,n){var r=t.page.borderBox;return Tn(t.descriptor.id,n)?Hr(r,ur(n.displacedBy.point)):r},Ob=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,a=e.insideDestination,s=e.afterCritical,l=a.filter(function(c){return wd({target:Lb(c,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var m=Kr(t,Ds(r,_d(c,s))),f=Kr(t,Ds(r,_d(p,s)));return m<f?-1:f<m?1:c.descriptor.index-p.descriptor.index});return l[0]||null},Yr=nt(function(t,n){var r=n[t.line];return{value:r,point:$n(t.line,r)}}),Pb=function(t,n,r){var a=t.axis;if(t.descriptor.mode==="virtual")return $n(a.line,n[a.line]);var s=t.subject.page.contentBox[a.size],l=Kn(t.descriptor.id,r),c=l.reduce(function(f,u){return f+u.client.marginBox[a.size]},0),p=c+n[a.line],m=p-s;return m<=0?null:$n(a.line,m)},Ld=function(t,n){return ye({},t,{scroll:ye({},t.scroll,{max:n})})},Od=function(t,n,r){var a=t.frame;fr(n,t)&&(process.env.NODE_ENV!=="production"?K(!1,"Should not add placeholder space to home list"):K()),t.subject.withPlaceholder&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot add placeholder size to a subject when it already has one"):K());var s=Yr(t.axis,n.displaceBy).point,l=Pb(t,s,r),c={placeholderSize:s,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var p=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return ye({},t,{subject:p})}var m=l?st(a.scroll.max,l):a.scroll.max,f=Ld(a,m),u=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:f});return ye({},t,{subject:u,frame:f})},Rb=function(t){var n=t.subject.withPlaceholder;n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot remove placeholder form subject when there was none"):K());var r=t.frame;if(!r){var a=mr({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ye({},t,{subject:a})}var s=n.oldFrameMaxScroll;s||(process.env.NODE_ENV!=="production"?K(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder"):K());var l=Ld(r,s),c=mr({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return ye({},t,{subject:c,frame:l})},Bb=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,a=e.draggable,s=e.draggables,l=e.destination,c=e.viewport,p=e.afterCritical;if(!n){if(r.length)return null;var m={displaced:Wr,displacedBy:yd,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},f=Vo({impact:m,draggable:a,droppable:l,draggables:s,afterCritical:p}),u=fr(a,l)?l:Od(l,a,s),h=Md({draggable:a,destination:u,newPageBorderBoxCenter:f,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?m:null}var S=t[l.axis.line]<=n.page.borderBox.center[l.axis.line],y=function(){var C=n.descriptor.index;return n.descriptor.id===a.descriptor.id||S?C:C+1}(),T=Yr(l.axis,a.displaceBy);return Fo({draggable:a,insideDestination:r,destination:l,viewport:c,displacedBy:T,last:Wr,index:y})},Ab=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,a=e.isOver,s=e.draggables,l=e.droppables,c=e.viewport,p=e.afterCritical,m=_b({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:l,viewport:c});if(!m)return null;var f=Kn(m.descriptor.id,s),u=Ob({pageBorderBoxCenter:n,viewport:c,destination:m,insideDestination:f,afterCritical:p}),h=Bb({previousPageBorderBoxCenter:n,destination:m,draggable:r,draggables:s,moveRelativeTo:u,insideDestination:f,viewport:c,afterCritical:p});if(!h)return null;var S=Vo({impact:h,draggable:r,droppable:m,draggables:s,afterCritical:p}),y=Ns({pageBorderBoxCenter:S,draggable:r,viewport:c});return{clientSelection:y,impact:h,scrollJumpRequest:null}},Ct=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},Fb=function(t,n){var r=Ct(t);return r?n[r]:null},Vb=function(e){var t=e.state,n=e.type,r=Fb(t.impact,t.dimensions.droppables),a=!!r,s=t.dimensions.droppables[t.critical.droppable.id],l=r||s,c=l.axis.direction,p=c==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||c==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(p&&!a)return null;var m=n==="MOVE_DOWN"||n==="MOVE_RIGHT",f=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,h=t.dimensions,S=h.draggables,y=h.droppables;return p?Mb({isMovingForward:m,previousPageBorderBoxCenter:u,draggable:f,destination:l,draggables:S,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Ab({isMovingForward:m,previousPageBorderBoxCenter:u,draggable:f,isOver:l,draggables:S,droppables:y,viewport:t.viewport,afterCritical:t.afterCritical})};function Hn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Pd(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(a){return t(a.y)&&n(a.x)}}function $b(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Kb(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,a=n.page.borderBox.center,s=r.map(function(l){var c=l.axis,p=$n(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:Kr(a,p)}}).sort(function(l,c){return c.distance-l.distance});return s[0]?s[0].id:null}function Hb(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,a=Ro(r).filter(function(s){if(!s.isEnabled)return!1;var l=s.subject.active;if(!l||!$b(t,l))return!1;if(Pd(l)(t.center))return!0;var c=s.axis,p=l.center[c.crossAxisLine],m=t[c.crossAxisStart],f=t[c.crossAxisEnd],u=_t(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(m),S=u(f);return!h&&!S?!0:h?m<p:f>p});return a.length?a.length===1?a[0].descriptor.id:Kb({pageBorderBox:t,draggable:n,candidates:a}):null}var Rd=function(t,n){return At(Hr(t,n))},Wb=function(e,t){var n=e.frame;return n?Rd(t,n.scroll.diff.value):t};function Bd(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function Gb(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var Yb=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.last,l=e.viewport,c=e.afterCritical,p=r.axis,m=Yr(r.axis,n.displaceBy),f=m.value,u=t[p.start],h=t[p.end],S=Ao(n,a),y=yn(S,function(C){var E=C.descriptor.id,N=C.page.borderBox.center[p.line],M=Tn(E,c),I=Bd({displaced:s,id:E});return M?I?h<=N:u<N-f:I?h<=N+f:u<N}),T=Gb({draggable:n,closest:y,inHomeList:fr(n,r)});return Fo({draggable:n,insideDestination:a,destination:r,viewport:l,last:s,displacedBy:m,index:T})},Ub=4,zb=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,a=e.destination,s=e.insideDestination,l=e.afterCritical;if(!a.isCombineEnabled)return null;var c=a.axis,p=Yr(a.axis,t.displaceBy),m=p.value,f=n[c.start],u=n[c.end],h=Ao(t,s),S=yn(h,function(T){var C=T.descriptor.id,E=T.page.borderBox,N=E[c.size],M=N/Ub,I=Tn(C,l),k=Bd({displaced:r.displaced,id:C});return I?k?u>E[c.start]+M&&u<E[c.end]-M:f>E[c.start]-m+M&&f<E[c.end]-m-M:k?u>E[c.start]+m+M&&u<E[c.end]+m-M:f>E[c.start]+M&&f<E[c.end]-M});if(!S)return null;var y={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:S.descriptor.id,droppableId:a.descriptor.id}}};return y},Ad=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,a=e.droppables,s=e.previousImpact,l=e.viewport,c=e.afterCritical,p=Rd(n.page.borderBox,t),m=Hb({pageBorderBox:p,draggable:n,droppables:a});if(!m)return ib;var f=a[m],u=Kn(f.descriptor.id,r),h=Wb(f,p);return zb({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:s,destination:f,insideDestination:u,afterCritical:c})||Yb({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:f,insideDestination:u,last:s.displaced,viewport:l,afterCritical:c})},ks=function(e,t){var n;return ye({},e,(n={},n[t.descriptor.id]=t,n))},jb=function(t){var n=t.previousImpact,r=t.impact,a=t.droppables,s=Ct(n),l=Ct(r);if(!s||s===l)return a;var c=a[s];if(!c.subject.withPlaceholder)return a;var p=Rb(c);return ks(a,p)},qb=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,a=e.previousImpact,s=e.impact,l=jb({previousImpact:a,impact:s,droppables:r}),c=Ct(s);if(!c)return l;var p=r[c];if(fr(t,p)||p.subject.withPlaceholder)return l;var m=Od(p,t,n);return ks(l,m)},Ur=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,a=e.viewport,s=e.impact,l=e.scrollJumpRequest,c=a||t.viewport,p=r||t.dimensions,m=n||t.current.client.selection,f=wt(m,t.initial.client.selection),u={offset:f,selection:m,borderBoxCenter:st(t.initial.client.borderBoxCenter,f)},h={selection:st(u.selection,c.scroll.current),borderBoxCenter:st(u.borderBoxCenter,c.scroll.current),offset:st(u.offset,c.scroll.diff.value)},S={client:u,page:h};if(t.phase==="COLLECTING")return ye({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:S});var y=p.draggables[t.critical.draggable.id],T=s||Ad({pageOffset:h.offset,draggable:y,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),C=qb({draggable:y,impact:T,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),E=ye({},t,{current:S,dimensions:{draggables:p.draggables,droppables:C},impact:T,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return E};function Jb(e,t){return e.map(function(n){return t[n]})}var Fd=function(e){var t=e.impact,n=e.viewport,r=e.draggables,a=e.destination,s=e.forceShouldAnimate,l=t.displaced,c=Jb(l.all,r),p=Gr({afterDragging:c,destination:a,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:s,last:l});return ye({},t,{displaced:p})},Vd=function(e){var t=e.impact,n=e.draggable,r=e.droppable,a=e.draggables,s=e.viewport,l=e.afterCritical,c=Vo({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:l});return Ns({pageBorderBoxCenter:c,draggable:n,viewport:s})},$d=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&(process.env.NODE_ENV,K());var a=t.impact,s=r||t.viewport,l=n||t.dimensions,c=l.draggables,p=l.droppables,m=c[t.critical.draggable.id],f=Ct(a);f||(process.env.NODE_ENV!=="production"?K(!1,"Must be over a destination in SNAP movement mode"):K());var u=p[f],h=Fd({impact:a,viewport:s,destination:u,draggables:c}),S=Vd({impact:h,draggable:m,droppable:u,draggables:c,viewport:s,afterCritical:t.afterCritical});return Ur({impact:h,clientSelection:S,state:t,dimensions:l,viewport:s})},Zb=function(e){return{index:e.index,droppableId:e.droppableId}},Kd=function(e){var t=e.draggable,n=e.home,r=e.draggables,a=e.viewport,s=Yr(n.axis,t.displaceBy),l=Kn(n.descriptor.id,r),c=l.indexOf(t);c===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Expected draggable to be inside home list"):K());var p=l.slice(c+1),m=p.reduce(function(S,y){return S[y.descriptor.id]=!0,S},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:s,effected:m},u=Gr({afterDragging:p,destination:n,displacedBy:s,last:null,viewport:a.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:s,at:{type:"REORDER",destination:Zb(t.descriptor)}};return{impact:h,afterCritical:f}},Xb=function(e,t){return{draggables:e.draggables,droppables:ks(e.droppables,t)}},zr=function(t){process.env.NODE_ENV},jr=function(t){process.env.NODE_ENV},Qb=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,a=Mo(t.client,n),s=_o(a,r),l=ye({},t,{placeholder:ye({},t.placeholder,{client:a}),client:a,page:s});return l},ev=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?K(!1,"Expected Droppable to have a frame"):K()),t},tv=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,a=r.scroll.diff.value;return t.map(function(s){var l=s.descriptor.droppableId,c=n[l],p=ev(c),m=p.scroll.diff.value,f=st(a,m),u=Qb({draggable:s,offset:f,initialWindowScroll:r.scroll.initial});return u})},nv=function(e){var t=e.state,n=e.published;zr();var r=n.modified.map(function(M){var I=t.dimensions.droppables[M.droppableId],k=vs(I,M.scroll);return k}),a=ye({},t.dimensions.droppables,{},bd(r)),s=vd(tv({additions:n.additions,updatedDroppables:a,viewport:t.viewport})),l=ye({},t.dimensions.draggables,{},s);n.removals.forEach(function(M){delete l[M]});var c={droppables:a,draggables:l},p=Ct(t.impact),m=p?c.droppables[p]:null,f=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=Kd({draggable:f,home:u,draggables:l,viewport:t.viewport}),S=h.impact,y=h.afterCritical,T=m&&m.isCombineEnabled?t.impact:S,C=Ad({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:T,viewport:t.viewport,afterCritical:y});jr();var E=ye({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:C,onLiftImpact:S,dimensions:c,afterCritical:y,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return E;var N=ye({phase:"DROP_PENDING"},E,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return N},Is=function(t){return t.movementMode==="SNAP"},xs=function(t,n,r){var a=Xb(t.dimensions,n);return!Is(t)||r?Ur({state:t,dimensions:a}):$d({state:t,dimensions:a})};function Ms(e){return e.isDragging&&e.movementMode==="SNAP"?ye({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Hd={phase:"IDLE",completed:null,shouldFlush:!1},rv=function(e,t){if(e===void 0&&(e=Hd),t.type==="FLUSH")return ye({},Hd,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"INITIAL_PUBLISH must come after a IDLE phase"):K());var n=t.payload,r=n.critical,a=n.clientSelection,s=n.viewport,l=n.dimensions,c=n.movementMode,p=l.draggables[r.draggable.id],m=l.droppables[r.droppable.id],f={selection:a,borderBoxCenter:p.client.borderBox.center,offset:rt},u={client:f,page:{selection:st(f.selection,s.scroll.initial),borderBoxCenter:st(f.selection,s.scroll.initial),offset:st(f.selection,s.scroll.diff.value)}},h=Ro(l.droppables).every(function(le){return!le.isFixedOnPage}),S=Kd({draggable:p,home:m,draggables:l.draggables,viewport:s}),y=S.impact,T=S.afterCritical,C={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:y,afterCritical:T,onLiftImpact:y,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null};return C}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,"Collection cannot start from phase "+e.phase):K());var E=ye({phase:"COLLECTING"},e,{phase:"COLLECTING"});return E}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Unexpected "+t.type+" received in phase "+e.phase):K()),nv({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var N=t.payload.client;return vn(N,e.current.client.selection)?e:Ur({state:e,clientSelection:N,impact:Is(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Ms(e);Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var M=t.payload,I=M.id,k=M.newScroll,V=e.dimensions.droppables[I];if(!V)return e;var R=vs(V,k);return xs(e,R,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var w=t.payload,P=w.id,O=w.isEnabled,$=e.dimensions.droppables[P];$||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+P+"] to toggle its enabled state"):K()),$.isEnabled===O&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isEnabled to "+String(O)+`
|
|
405
405
|
but it is already `+String($.isEnabled)):K());var J=ye({},$,{isEnabled:O});return xs(e,J,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var L=t.payload,Z=L.id,A=L.isCombineEnabled,ne=e.dimensions.droppables[Z];ne||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+Z+"] to toggle its isCombineEnabled state"):K()),ne.isCombineEnabled===A&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isCombineEnabled to "+String(A)+`
|
|
406
|
-
but it is already `+String(ne.isCombineEnabled)):K());var Y=ye({},ne,{isCombineEnabled:A});return xs(e,Y,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move by window in phase "+e.phase):K()),e.isWindowScrollAllowed||(process.env.NODE_ENV!=="production"?K(!1,"Window scrolling is currently not supported for fixed lists"):K());var U=t.payload.newScroll;if(vn(e.viewport.scroll.current,U))return Ms(e);var ae=Id(e.viewport,U);return Is(e)?$d({state:e,viewport:ae}):
|
|
406
|
+
but it is already `+String(ne.isCombineEnabled)):K());var Y=ye({},ne,{isCombineEnabled:A});return xs(e,Y,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move by window in phase "+e.phase):K()),e.isWindowScrollAllowed||(process.env.NODE_ENV!=="production"?K(!1,"Window scrolling is currently not supported for fixed lists"):K());var U=t.payload.newScroll;if(vn(e.viewport.scroll.current,U))return Ms(e);var ae=Id(e.viewport,U);return Is(e)?$d({state:e,viewport:ae}):Ur({state:e,viewport:ae})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Hn(e))return e;var H=t.payload.maxScroll;if(vn(H,e.viewport.scroll.max))return e;var q=ye({},e.viewport,{scroll:ye({},e.viewport.scroll,{max:H})});return ye({phase:"DRAGGING"},e,{viewport:q})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,t.type+" received while not in DRAGGING phase"):K());var re=Vb({state:e,type:t.type});return re?Ur({state:e,impact:re.impact,clientSelection:re.clientSelection,scrollJumpRequest:re.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var oe=t.payload.reason;e.phase!=="COLLECTING"&&(process.env.NODE_ENV!=="production"?K(!1,"Can only move into the DROP_PENDING phase from the COLLECTING phase"):K());var j=ye({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:oe});return j}if(t.type==="DROP_ANIMATE"){var B=t.payload,z=B.completed,Q=B.dropDuration,ee=B.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Cannot animate drop from phase "+e.phase):K());var de={phase:"DROP_ANIMATING",completed:z,dropDuration:Q,newHomeClientOffset:ee,dimensions:e.dimensions};return de}if(t.type==="DROP_COMPLETE"){var ie=t.payload.completed;return{phase:"IDLE",completed:ie,shouldFlush:!1}}return e},ov=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},av=function(t){return{type:"LIFT",payload:t}},sv=function(t){return{type:"INITIAL_PUBLISH",payload:t}},iv=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},lv=function(){return{type:"COLLECTION_STARTING",payload:null}},cv=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},dv=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},pv=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},Wd=function(t){return{type:"MOVE",payload:t}},uv=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},mv=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},fv=function(){return{type:"MOVE_UP",payload:null}},hv=function(){return{type:"MOVE_DOWN",payload:null}},Sv=function(){return{type:"MOVE_RIGHT",payload:null}},gv=function(){return{type:"MOVE_LEFT",payload:null}},_s=function(){return{type:"FLUSH",payload:null}},bv=function(t){return{type:"DROP_ANIMATE",payload:t}},Ls=function(t){return{type:"DROP_COMPLETE",payload:t}},Gd=function(t){return{type:"DROP",payload:t}},vv=function(t){return{type:"DROP_PENDING",payload:t}},Yd=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function yv(e){if(!(e.length<=1)){for(var t=e.map(function(c){return c.descriptor.index}),n={},r=1;r<t.length;r++){var a=t[r],s=t[r-1];a!==s+1&&(n[a]=!0)}if(Object.keys(n).length){var l=t.map(function(c){var p=!!n[c];return p?"[🔥"+c+"]":""+c}).join(", ");process.env.NODE_ENV!=="production"&&We(`
|
|
407
407
|
Detected non-consecutive <Draggable /> indexes.
|
|
408
408
|
|
|
409
409
|
(This can cause unexpected bugs)
|
|
410
410
|
|
|
411
411
|
`+l+`
|
|
412
|
-
`)}}}function Tv(e,t){if(process.env.NODE_ENV!=="production"){var n=Kn(e.droppable.id,t.draggables);yv(n)}}var Ev=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(a){return function(s){if(s.type!=="LIFT"){a(s);return}var l=s.payload,c=l.id,p=l.clientSelection,m=l.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(Ls({completed:f.completed})),n().phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Unexpected phase to start a drag"):K()),r(_s()),r(ov({draggableId:c,movementMode:m}));var u={shouldPublishImmediately:m==="SNAP"},h={draggableId:c,scrollOptions:u},S=e.startPublishing(h),y=S.critical,T=S.dimensions,C=S.viewport;Tv(y,T),r(sv({critical:y,dimensions:T,clientSelection:p,movementMode:m,viewport:C}))}}}},wv=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Os={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},
|
|
412
|
+
`)}}}function Tv(e,t){if(process.env.NODE_ENV!=="production"){var n=Kn(e.droppable.id,t.draggables);yv(n)}}var Ev=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(a){return function(s){if(s.type!=="LIFT"){a(s);return}var l=s.payload,c=l.id,p=l.clientSelection,m=l.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(Ls({completed:f.completed})),n().phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Unexpected phase to start a drag"):K()),r(_s()),r(ov({draggableId:c,movementMode:m}));var u={shouldPublishImmediately:m==="SNAP"},h={draggableId:c,scrollOptions:u},S=e.startPublishing(h),y=S.critical,T=S.dimensions,C=S.viewport;Tv(y,T),r(sv({critical:y,dimensions:T,clientSelection:p,movementMode:m,viewport:C}))}}}},wv=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Os={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},qr={opacity:{drop:0,combining:.7},scale:{drop:.75}},Ps={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Wn=Ps.outOfTheWay+"s "+Os.outOfTheWay,Jr={fluid:"opacity "+Wn,snap:"transform "+Wn+", opacity "+Wn,drop:function(t){var n=t+"s "+Os.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Wn,placeholder:"height "+Wn+", width "+Wn+", margin "+Wn},Ud=function(t){return vn(t,rt)?null:"translate("+t.x+"px, "+t.y+"px)"},Rs={moveTo:Ud,drop:function(t,n){var r=Ud(t);return r?n?r+" scale("+qr.scale.drop+")":r:null}},Bs=Ps.minDropTime,zd=Ps.maxDropTime,Cv=zd-Bs,jd=1500,Dv=.6,Nv=function(e){var t=e.current,n=e.destination,r=e.reason,a=Kr(t,n);if(a<=0)return Bs;if(a>=jd)return zd;var s=a/jd,l=Bs+Cv*s,c=r==="CANCEL"?l*Dv:l;return Number(c.toFixed(2))},kv=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,a=e.viewport,s=e.afterCritical,l=r.draggables,c=r.droppables,p=Ct(t),m=p?c[p]:null,f=c[n.descriptor.droppableId],u=Vd({impact:t,draggable:n,draggables:l,afterCritical:s,droppable:m||f,viewport:a}),h=wt(u,n.client.borderBox.center);return h},Iv=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,a=e.home,s=e.viewport,l=e.onLiftImpact;if(!r.at||n!=="DROP"){var c=Fd({draggables:t,impact:l,destination:a,viewport:s,forceShouldAnimate:!0});return{impact:c,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var p=ye({},r,{displaced:Wr});return{impact:p,didDropInsideDroppable:!0}},xv=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(a){if(a.type!=="DROP"){r(a);return}var s=t(),l=a.payload.reason;if(s.phase==="COLLECTING"){n(vv({reason:l}));return}if(s.phase!=="IDLE"){var c=s.phase==="DROP_PENDING"&&s.isWaiting;c&&(process.env.NODE_ENV!=="production"?K(!1,"A DROP action occurred while DROP_PENDING and still waiting"):K()),s.phase==="DRAGGING"||s.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Cannot drop in phase: "+s.phase):K());var p=s.critical,m=s.dimensions,f=m.draggables[s.critical.draggable.id],u=Iv({reason:l,lastImpact:s.impact,afterCritical:s.afterCritical,onLiftImpact:s.onLiftImpact,home:s.dimensions.droppables[s.critical.droppable.id],viewport:s.viewport,draggables:s.dimensions.draggables}),h=u.impact,S=u.didDropInsideDroppable,y=S?Ts(h):null,T=S?Bo(h):null,C={index:p.draggable.index,droppableId:p.droppable.id},E={draggableId:f.descriptor.id,type:f.descriptor.type,source:C,reason:l,mode:s.movementMode,destination:y,combine:T},N=kv({impact:h,draggable:f,dimensions:m,viewport:s.viewport,afterCritical:s.afterCritical}),M={critical:s.critical,afterCritical:s.afterCritical,result:E,impact:h},I=!vn(s.current.client.offset,N)||!!E.combine;if(!I){n(Ls({completed:M}));return}var k=Nv({current:s.current.client.offset,destination:N,reason:l}),V={newHomeClientOffset:N,dropDuration:k,completed:M};n(bv(V))}}}},qd=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Mv(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function _v(e){var t=e.onWindowScroll;function n(){t(qd())}var r=Vr(n),a=Mv(r),s=bn;function l(){return s!==bn}function c(){l()&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start scroll listener when already active"):K()),s=Mt(window,[a])}function p(){l()||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop scroll listener when not active"):K()),r.cancel(),s(),s=bn}return{start:c,stop:p,isActive:l}}var Lv=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Ov=function(e){var t=_v({onWindowScroll:function(r){e.dispatch(uv({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&Lv(r)&&t.stop(),n(r)}}},Pv=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),a=function(l){if(t){process.env.NODE_ENV!=="production"&&We("Announcement already made. Not making a second announcement");return}if(n){process.env.NODE_ENV!=="production"&&We(`
|
|
413
413
|
Announcements cannot be made asynchronously.
|
|
414
414
|
Default message has already been announced.
|
|
415
|
-
`);return}t=!0,e(l),clearTimeout(r)};return a.wasCalled=function(){return t},a},Rv=function(){var e=[],t=function(s){var l=ys(e,function(m){return m.timerId===s});l===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find timer"):K());var c=e.splice(l,1),p=c[0];p.callback()},n=function(s){var l=setTimeout(function(){return t(l)}),c={timerId:l,callback:s};e.push(c)},r=function(){if(e.length){var s=[].concat(e);e.length=0,s.forEach(function(l){clearTimeout(l.timerId),l.callback()})}};return{add:n,flush:r}},Bv=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},Av=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},Fv=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,a=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&a},
|
|
415
|
+
`);return}t=!0,e(l),clearTimeout(r)};return a.wasCalled=function(){return t},a},Rv=function(){var e=[],t=function(s){var l=ys(e,function(m){return m.timerId===s});l===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find timer"):K());var c=e.splice(l,1),p=c[0];p.callback()},n=function(s){var l=setTimeout(function(){return t(l)}),c={timerId:l,callback:s};e.push(c)},r=function(){if(e.length){var s=[].concat(e);e.length=0,s.forEach(function(l){clearTimeout(l.timerId),l.callback()})}};return{add:n,flush:r}},Bv=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},Av=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},Fv=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,a=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&a},Zr=function(t,n){zr(),n(),jr()},$o=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},As=function(t,n,r,a){if(!t){r(a(n));return}var s=Pv(r),l={announce:s};t(n,l),s.wasCalled()||r(a(n))},Vv=function(e,t){var n=Rv(),r=null,a=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeCapture as a drag start has already been published"):K()),Zr("onBeforeCapture",function(){var y=e().onBeforeCapture;if(y){var T={draggableId:h,mode:S};y(T)}})},s=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K()),Zr("onBeforeDragStart",function(){var y=e().onBeforeDragStart;y&&y($o(h,S))})},l=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K());var y=$o(h,S);r={mode:S,lastCritical:h,lastLocation:y.source,lastCombine:null},n.add(function(){Zr("onDragStart",function(){return As(e().onDragStart,y,t,Oo.onDragStart)})})},c=function(h,S){var y=Ts(S),T=Bo(S);r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragMove when onDragStart has not been called"):K());var C=!Fv(h,r.lastCritical);C&&(r.lastCritical=h);var E=!Bv(r.lastLocation,y);E&&(r.lastLocation=y);var N=!Av(r.lastCombine,T);if(N&&(r.lastCombine=T),!(!C&&!E&&!N)){var M=ye({},$o(h,r.mode),{combine:T,destination:y});n.add(function(){Zr("onDragUpdate",function(){return As(e().onDragUpdate,M,t,Oo.onDragUpdate)})})}},p=function(){r||(process.env.NODE_ENV!=="production"?K(!1,"Can only flush responders while dragging"):K()),n.flush()},m=function(h){r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragEnd when there is no matching onDragStart"):K()),r=null,Zr("onDragEnd",function(){return As(e().onDragEnd,h,t,Oo.onDragEnd)})},f=function(){if(r){var h=ye({},$o(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});m(h)}};return{beforeCapture:a,beforeStart:s,start:l,update:c,flush:p,drop:m,abort:f}},$v=function(e,t){var n=Vv(e,t);return function(r){return function(a){return function(s){if(s.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(s.payload.draggableId,s.payload.movementMode);return}if(s.type==="INITIAL_PUBLISH"){var l=s.payload.critical;n.beforeStart(l,s.payload.movementMode),a(s),n.start(l,s.payload.movementMode);return}if(s.type==="DROP_COMPLETE"){var c=s.payload.completed.result;n.flush(),a(s),n.drop(c);return}if(a(s),s.type==="FLUSH"){n.abort();return}var p=r.getState();p.phase==="DRAGGING"&&n.update(p.critical,p.impact)}}}},Kv=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot finish a drop animating when no drop is occurring"):K()),e.dispatch(Ls({completed:r.completed}))}}},Hv=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(a){return function(s){if((s.type==="FLUSH"||s.type==="DROP_COMPLETE"||s.type==="DROP_ANIMATION_FINISHED")&&r(),a(s),s.type==="DROP_ANIMATE"){var l={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var p=e.getState();p.phase==="DROP_ANIMATING"&&e.dispatch(Yd())}};n=requestAnimationFrame(function(){n=null,t=Mt(window,[l])})}}}},Wv=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},Gv=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var a=r.payload.completed.result;a.combine&&e.tryShiftRecord(a.draggableId,a.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},Yv=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Uv=function(e){return function(t){return function(n){return function(r){if(Yv(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var a=t.getState();a.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,"Expected phase to be DRAGGING after INITIAL_PUBLISH"):K()),e.start(a);return}n(r),e.scroll(t.getState())}}}},zv=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(Gd({reason:r.reason})))}}}},jv=process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"react-beautiful-dnd"}):Dc,qv=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,a=e.getResponders,s=e.announce,l=e.autoScroller;return Ec(rv,jv(_S(wv(r),Wv(t),Ev(t),xv,Kv,Hv,zv,Uv(l),Ov,Gv(n),$v(a,s))))},Fs=function(){return{additions:{},removals:{},modified:{}}};function Jv(e){var t=e.registry,n=e.callbacks,r=Fs(),a=null,s=function(){a||(n.collectionStarting(),a=requestAnimationFrame(function(){a=null,zr();var f=r,u=f.additions,h=f.removals,S=f.modified,y=Object.keys(u).map(function(E){return t.draggable.getById(E).getDimension(rt)}).sort(function(E,N){return E.descriptor.index-N.descriptor.index}),T=Object.keys(S).map(function(E){var N=t.droppable.getById(E),M=N.callbacks.getScrollWhileDragging();return{droppableId:E,scroll:M}}),C={additions:y,removals:Object.keys(h),modified:T};r=Fs(),jr(),n.publish(C)}))},l=function(f){var u=f.descriptor.id;r.additions[u]=f,r.modified[f.descriptor.droppableId]=!0,r.removals[u]&&delete r.removals[u],s()},c=function(f){var u=f.descriptor;r.removals[u.id]=!0,r.modified[u.droppableId]=!0,r.additions[u.id]&&delete r.additions[u.id],s()},p=function(){a&&(cancelAnimationFrame(a),a=null,r=Fs())};return{add:l,remove:c,stop:p}}var Jd=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,a=e.width,s=wt({x:n,y:t},{x:a,y:r}),l={x:Math.max(0,s.x),y:Math.max(0,s.y)};return l},Zd=function(){var e=document.documentElement;return e||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find document.documentElement"):K()),e},Xd=function(){var e=Zd(),t=Jd({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},Zv=function(){var e=qd(),t=Xd(),n=e.y,r=e.x,a=Zd(),s=a.clientWidth,l=a.clientHeight,c=r+s,p=n+l,m=At({top:n,left:r,right:c,bottom:p}),f={frame:m,scroll:{initial:e,current:e,max:t,diff:{value:rt,displacement:rt}}};return f},Xv=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;zr();var a=Zv(),s=a.scroll.current,l=t.droppable,c=r.droppable.getAllByType(l.type).map(function(u){return u.callbacks.getDimensionAndWatchScroll(s,n)}),p=r.draggable.getAllByType(t.draggable.type).map(function(u){return u.getDimension(s)}),m={draggables:vd(p),droppables:bd(c)};jr();var f={dimensions:m,critical:t,viewport:a};return f};function Qd(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode!=="virtual"?(process.env.NODE_ENV!=="production"&&We(`
|
|
416
416
|
You are attempting to add or remove a Draggable [id: `+n.descriptor.id+`]
|
|
417
417
|
while a drag is occurring. This is only supported for virtual lists.
|
|
418
418
|
|
|
@@ -421,7 +421,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
421
421
|
Detected distance range of 0 in the fluid auto scroller
|
|
422
422
|
This is unexpected and would cause a divide by 0 issue.
|
|
423
423
|
Not allowing an auto scroll
|
|
424
|
-
`),0;var s=r-t,l=s/a;return l},Vs=1,ay=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return En.maxPixelScroll;if(e===t.startScrollingFrom)return Vs;var n=tp({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,a=En.maxPixelScroll*En.ease(r);return Math.ceil(a)},np=En.durationDampening.accelerateAt,rp=En.durationDampening.stopDampeningAt,sy=function(e,t){var n=t,r=rp,a=Date.now(),s=a-n;if(s>=rp)return e;if(s<np)return Vs;var l=tp({startOfRange:np,endOfRange:r,current:s}),c=e*En.ease(l);return Math.ceil(c)},op=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,a=e.shouldUseTimeDampening,s=ay(t,n);return s===0?0:a?Math.max(sy(s,r),Vs):s},ap=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,a=e.axis,s=e.shouldUseTimeDampening,l=oy(t,a),c=n[a.end]<n[a.start];return c?op({distanceToEdge:n[a.end],thresholds:l,dragStartTime:r,shouldUseTimeDampening:s}):-1*op({distanceToEdge:n[a.start],thresholds:l,dragStartTime:r,shouldUseTimeDampening:s})},iy=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,a=n.height>t.height,s=n.width>t.width;return!s&&!a?r:s&&a?null:{x:s?0:r.x,y:a?0:r.y}},ly=hd(function(e){return e===0?0:e}),sp=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,a=e.center,s=e.shouldUseTimeDampening,l={top:a.y-n.top,right:n.right-a.x,bottom:n.bottom-a.y,left:a.x-n.left},c=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Es,shouldUseTimeDampening:s}),p=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Ed,shouldUseTimeDampening:s}),m=ly({x:p,y:c});if(vn(m,rt))return null;var f=iy({container:n,subject:r,proposedScroll:m});return f?vn(f,rt)?null:f:null},cy=hd(function(e){return e===0?0:e>0?1:-1}),$s=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,a=t.change,s=st(n,a),l={x:e(s.x,r.x),y:e(s.y,r.y)};return vn(l,rt)?null:l}}(),ip=function(t){var n=t.max,r=t.current,a=t.change,s={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},l=cy(a),c=$s({max:s,current:r,change:l});return!c||l.x!==0&&c.x===0||l.y!==0&&c.y===0},Ks=function(t,n){return ip({current:t.scroll.current,max:t.scroll.max,change:n})},dy=function(t,n){if(!Ks(t,n))return null;var r=t.scroll.max,a=t.scroll.current;return $s({current:a,max:r,change:n})},Hs=function(t,n){var r=t.frame;return r?ip({current:r.scroll.current,max:r.scroll.max,change:n}):!1},py=function(t,n){var r=t.frame;return!r||!Hs(t,n)?null:$s({current:r.scroll.current,max:r.scroll.max,change:n})},uy=function(e){var t=e.viewport,n=e.subject,r=e.center,a=e.dragStartTime,s=e.shouldUseTimeDampening,l=sp({dragStartTime:a,container:t.frame,subject:n,center:r,shouldUseTimeDampening:s});return l&&Ks(t,l)?l:null},my=function(e){var t=e.droppable,n=e.subject,r=e.center,a=e.dragStartTime,s=e.shouldUseTimeDampening,l=t.frame;if(!l)return null;var c=sp({dragStartTime:a,container:l.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:s});return c&&Hs(t,c)?c:null},lp=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,a=e.scrollWindow,s=e.scrollDroppable,l=t.current.page.borderBoxCenter,c=t.dimensions.draggables[t.critical.draggable.id],p=c.page.marginBox;if(t.isWindowScrollAllowed){var m=t.viewport,f=uy({dragStartTime:n,viewport:m,subject:p,center:l,shouldUseTimeDampening:r});if(f){a(f);return}}var u=ry({center:l,destination:Ct(t.impact),droppables:t.dimensions.droppables});if(u){var h=my({dragStartTime:n,droppable:u,subject:p,center:l,shouldUseTimeDampening:r});h&&s(u.descriptor.id,h)}},fy=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=
|
|
424
|
+
`),0;var s=r-t,l=s/a;return l},Vs=1,ay=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return En.maxPixelScroll;if(e===t.startScrollingFrom)return Vs;var n=tp({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,a=En.maxPixelScroll*En.ease(r);return Math.ceil(a)},np=En.durationDampening.accelerateAt,rp=En.durationDampening.stopDampeningAt,sy=function(e,t){var n=t,r=rp,a=Date.now(),s=a-n;if(s>=rp)return e;if(s<np)return Vs;var l=tp({startOfRange:np,endOfRange:r,current:s}),c=e*En.ease(l);return Math.ceil(c)},op=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,a=e.shouldUseTimeDampening,s=ay(t,n);return s===0?0:a?Math.max(sy(s,r),Vs):s},ap=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,a=e.axis,s=e.shouldUseTimeDampening,l=oy(t,a),c=n[a.end]<n[a.start];return c?op({distanceToEdge:n[a.end],thresholds:l,dragStartTime:r,shouldUseTimeDampening:s}):-1*op({distanceToEdge:n[a.start],thresholds:l,dragStartTime:r,shouldUseTimeDampening:s})},iy=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,a=n.height>t.height,s=n.width>t.width;return!s&&!a?r:s&&a?null:{x:s?0:r.x,y:a?0:r.y}},ly=hd(function(e){return e===0?0:e}),sp=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,a=e.center,s=e.shouldUseTimeDampening,l={top:a.y-n.top,right:n.right-a.x,bottom:n.bottom-a.y,left:a.x-n.left},c=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Es,shouldUseTimeDampening:s}),p=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Ed,shouldUseTimeDampening:s}),m=ly({x:p,y:c});if(vn(m,rt))return null;var f=iy({container:n,subject:r,proposedScroll:m});return f?vn(f,rt)?null:f:null},cy=hd(function(e){return e===0?0:e>0?1:-1}),$s=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,a=t.change,s=st(n,a),l={x:e(s.x,r.x),y:e(s.y,r.y)};return vn(l,rt)?null:l}}(),ip=function(t){var n=t.max,r=t.current,a=t.change,s={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},l=cy(a),c=$s({max:s,current:r,change:l});return!c||l.x!==0&&c.x===0||l.y!==0&&c.y===0},Ks=function(t,n){return ip({current:t.scroll.current,max:t.scroll.max,change:n})},dy=function(t,n){if(!Ks(t,n))return null;var r=t.scroll.max,a=t.scroll.current;return $s({current:a,max:r,change:n})},Hs=function(t,n){var r=t.frame;return r?ip({current:r.scroll.current,max:r.scroll.max,change:n}):!1},py=function(t,n){var r=t.frame;return!r||!Hs(t,n)?null:$s({current:r.scroll.current,max:r.scroll.max,change:n})},uy=function(e){var t=e.viewport,n=e.subject,r=e.center,a=e.dragStartTime,s=e.shouldUseTimeDampening,l=sp({dragStartTime:a,container:t.frame,subject:n,center:r,shouldUseTimeDampening:s});return l&&Ks(t,l)?l:null},my=function(e){var t=e.droppable,n=e.subject,r=e.center,a=e.dragStartTime,s=e.shouldUseTimeDampening,l=t.frame;if(!l)return null;var c=sp({dragStartTime:a,container:l.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:s});return c&&Hs(t,c)?c:null},lp=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,a=e.scrollWindow,s=e.scrollDroppable,l=t.current.page.borderBoxCenter,c=t.dimensions.draggables[t.critical.draggable.id],p=c.page.marginBox;if(t.isWindowScrollAllowed){var m=t.viewport,f=uy({dragStartTime:n,viewport:m,subject:p,center:l,shouldUseTimeDampening:r});if(f){a(f);return}}var u=ry({center:l,destination:Ct(t.impact),droppables:t.dimensions.droppables});if(u){var h=my({dragStartTime:n,droppable:u,subject:p,center:l,shouldUseTimeDampening:r});h&&s(u.descriptor.id,h)}},fy=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Vr(t),a=Vr(n),s=null,l=function(f){s||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fluid scroll if not dragging"):K());var u=s,h=u.shouldUseTimeDampening,S=u.dragStartTime;lp({state:f,scrollWindow:r,scrollDroppable:a,dragStartTime:S,shouldUseTimeDampening:h})},c=function(f){zr(),s&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start auto scrolling when already started"):K());var u=Date.now(),h=!1,S=function(){h=!0};lp({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:S,scrollDroppable:S}),s={dragStartTime:u,shouldUseTimeDampening:h},jr(),h&&l(f)},p=function(){s&&(r.cancel(),a.cancel(),s=null)};return{start:c,stop:p,scroll:l}},hy=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,a=function(m,f){var u=st(m.current.client.selection,f);t({client:u})},s=function(m,f){if(!Hs(m,f))return f;var u=py(m,f);if(!u)return n(m.descriptor.id,f),null;var h=wt(f,u);n(m.descriptor.id,h);var S=wt(f,h);return S},l=function(m,f,u){if(!m||!Ks(f,u))return u;var h=dy(f,u);if(!h)return r(u),null;var S=wt(u,h);r(S);var y=wt(u,S);return y},c=function(m){var f=m.scrollJumpRequest;if(f){var u=Ct(m.impact);u||(process.env.NODE_ENV!=="production"?K(!1,"Cannot perform a jump scroll when there is no destination"):K());var h=s(m.dimensions.droppables[u],f);if(h){var S=m.viewport,y=l(m.isWindowScrollAllowed,S,h);y&&a(m,y)}}};return c},Sy=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,a=fy({scrollWindow:n,scrollDroppable:t}),s=hy({move:r,scrollWindow:n,scrollDroppable:t}),l=function(m){if(m.phase==="DRAGGING"){if(m.movementMode==="FLUID"){a.scroll(m);return}m.scrollJumpRequest&&s(m)}},c={scroll:l,start:a.start,stop:a.stop};return c},hr="data-rbd",Sr=function(){var e=hr+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Ws=function(){var e=hr+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),gy=function(){var e=hr+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),cp={contextId:hr+"-scroll-container-context-id"},by=function(t){return function(n){return"["+n+'="'+t+'"]'}},Xr=function(t,n){return t.map(function(r){var a=r.styles[n];return a?r.selector+" { "+a+" }":""}).join(" ")},vy="pointer-events: none;",yy=function(e){var t=by(e),n=function(){var c=`
|
|
425
425
|
cursor: -webkit-grab;
|
|
426
426
|
cursor: grab;
|
|
427
427
|
`;return{selector:t(Sr.contextId),styles:{always:`
|
|
@@ -429,7 +429,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
429
429
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
430
430
|
touch-action: manipulation;
|
|
431
431
|
`,resting:c,dragging:vy,dropAnimating:c}}}(),r=function(){var c=`
|
|
432
|
-
transition: `+
|
|
432
|
+
transition: `+Jr.outOfTheWay+`;
|
|
433
433
|
`;return{selector:t(Ws.contextId),styles:{dragging:c,dropAnimating:c,userCancel:c}}}(),a={selector:t(gy.contextId),styles:{always:"overflow-anchor: none;"}},s={selector:"body",styles:{dragging:`
|
|
434
434
|
cursor: grabbing;
|
|
435
435
|
cursor: -webkit-grabbing;
|
|
@@ -438,7 +438,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
438
438
|
-moz-user-select: none;
|
|
439
439
|
-ms-user-select: none;
|
|
440
440
|
overflow-anchor: none;
|
|
441
|
-
`}},l=[r,n,a,s];return{always:
|
|
441
|
+
`}},l=[r,n,a,s];return{always:Xr(l,"always"),resting:Xr(l,"resting"),dragging:Xr(l,"dragging"),dropAnimating:Xr(l,"dropAnimating"),userCancel:Xr(l,"userCancel")}},Dt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,Gs=function(){var t=document.querySelector("head");return t||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find the head to append a style to"):K()),t},dp=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function Ty(e,t){var n=Me(function(){return yy(e)},[e]),r=x.useRef(null),a=x.useRef(null),s=ge(nt(function(u){var h=a.current;h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot set dynamic style element if it is not set"):K()),h.textContent=u}),[]),l=ge(function(u){var h=r.current;h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot set dynamic style element if it is not set"):K()),h.textContent=u},[]);Dt(function(){!r.current&&!a.current||(process.env.NODE_ENV!=="production"?K(!1,"style elements already mounted"):K());var u=dp(t),h=dp(t);return r.current=u,a.current=h,u.setAttribute(hr+"-always",e),h.setAttribute(hr+"-dynamic",e),Gs().appendChild(u),Gs().appendChild(h),l(n.always),s(n.resting),function(){var S=function(T){var C=T.current;C||(process.env.NODE_ENV!=="production"?K(!1,"Cannot unmount ref as it is not set"):K()),Gs().removeChild(C),T.current=null};S(r),S(a)}},[t,l,s,n.always,n.resting,e]);var c=ge(function(){return s(n.dragging)},[s,n.dragging]),p=ge(function(u){if(u==="DROP"){s(n.dropAnimating);return}s(n.userCancel)},[s,n.dropAnimating,n.userCancel]),m=ge(function(){a.current&&s(n.resting)},[s,n.resting]),f=Me(function(){return{dragging:c,dropping:p,resting:m}},[c,p,m]);return f}var pp=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Qr(e){return e instanceof pp(e).HTMLElement}function up(e,t){var n="["+Sr.contextId+'="'+e+'"]',r=gd(document.querySelectorAll(n));if(!r.length)return process.env.NODE_ENV!=="production"&&We('Unable to find any drag handles in the context "'+e+'"'),null;var a=yn(r,function(s){return s.getAttribute(Sr.draggableId)===t});return a?Qr(a)?a:(process.env.NODE_ENV!=="production"&&We("drag handle needs to be a HTMLElement"),null):(process.env.NODE_ENV!=="production"&&We('Unable to find drag handle with id "'+t+'" as no handle with a matching id was found'),null)}function Ey(e){var t=x.useRef({}),n=x.useRef(null),r=x.useRef(null),a=x.useRef(!1),s=ge(function(h,S){var y={id:h,focus:S};return t.current[h]=y,function(){var C=t.current,E=C[h];E!==y&&delete C[h]}},[]),l=ge(function(h){var S=up(e,h);S&&S!==document.activeElement&&S.focus()},[e]),c=ge(function(h,S){n.current===h&&(n.current=S)},[]),p=ge(function(){r.current||a.current&&(r.current=requestAnimationFrame(function(){r.current=null;var h=n.current;h&&l(h)}))},[l]),m=ge(function(h){n.current=null;var S=document.activeElement;S&&S.getAttribute(Sr.draggableId)===h&&(n.current=h)},[]);Dt(function(){return a.current=!0,function(){a.current=!1;var h=r.current;h&&cancelAnimationFrame(h)}},[]);var f=Me(function(){return{register:s,tryRecordFocus:m,tryRestoreFocusRecorded:p,tryShiftRecord:c}},[s,m,p,c]);return f}function wy(){var e={draggables:{},droppables:{}},t=[];function n(u){return t.push(u),function(){var S=t.indexOf(u);S!==-1&&t.splice(S,1)}}function r(u){t.length&&t.forEach(function(h){return h(u)})}function a(u){return e.draggables[u]||null}function s(u){var h=a(u);return h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find draggable entry with id ["+u+"]"):K()),h}var l={register:function(h){e.draggables[h.descriptor.id]=h,r({type:"ADDITION",value:h})},update:function(h,S){var y=e.draggables[S.descriptor.id];y&&y.uniqueId===h.uniqueId&&(delete e.draggables[S.descriptor.id],e.draggables[h.descriptor.id]=h)},unregister:function(h){var S=h.descriptor.id,y=a(S);y&&h.uniqueId===y.uniqueId&&(delete e.draggables[S],r({type:"REMOVAL",value:h}))},getById:s,findById:a,exists:function(h){return!!a(h)},getAllByType:function(h){return Po(e.draggables).filter(function(S){return S.descriptor.type===h})}};function c(u){return e.droppables[u]||null}function p(u){var h=c(u);return h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find droppable entry with id ["+u+"]"):K()),h}var m={register:function(h){e.droppables[h.descriptor.id]=h},unregister:function(h){var S=c(h.descriptor.id);S&&h.uniqueId===S.uniqueId&&delete e.droppables[h.descriptor.id]},getById:p,findById:c,exists:function(h){return!!c(h)},getAllByType:function(h){return Po(e.droppables).filter(function(S){return S.descriptor.type===h})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:l,droppable:m,subscribe:n,clean:f}}function Cy(){var e=Me(wy,[]);return x.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Ys=x.createContext(null),eo=function(){var e=document.body;return e||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find document.body"):K()),e},Dy={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Ny=function(t){return"rbd-announcement-"+t};function ky(e){var t=Me(function(){return Ny(e)},[e]),n=x.useRef(null);x.useEffect(function(){var s=document.createElement("div");return n.current=s,s.id=t,s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true"),ye(s.style,Dy),eo().appendChild(s),function(){setTimeout(function(){var p=eo();p.contains(s)&&p.removeChild(s),s===n.current&&(n.current=null)})}},[t]);var r=ge(function(a){var s=n.current;if(s){s.textContent=a;return}process.env.NODE_ENV!=="production"&&We(`
|
|
442
442
|
A screen reader message was trying to be announced but it was unable to do so.
|
|
443
443
|
This can occur if you unmount your <DragDropContext /> in your onDragEnd.
|
|
444
444
|
Consider calling provided.announce() before the unmount so that the instruction will
|
|
@@ -447,7 +447,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
447
447
|
Message not passed to screen reader:
|
|
448
448
|
|
|
449
449
|
"`+a+`"
|
|
450
|
-
`)},[]);return r}var mp=0,Iy={separator:"::"};function xy(){mp=0}function Us(e,t){return t===void 0&&(t=Iy),Me(function(){return""+e+t.separator+mp++},[t.separator,e])}function My(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function _y(e){var t=e.contextId,n=e.text,r=Us("hidden-text",{separator:"-"}),a=Me(function(){return My({contextId:t,uniqueId:r})},[r,t]);return x.useEffect(function(){var l=document.createElement("div");return l.id=a,l.textContent=n,l.style.display="none",
|
|
450
|
+
`)},[]);return r}var mp=0,Iy={separator:"::"};function xy(){mp=0}function Us(e,t){return t===void 0&&(t=Iy),Me(function(){return""+e+t.separator+mp++},[t.separator,e])}function My(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function _y(e){var t=e.contextId,n=e.text,r=Us("hidden-text",{separator:"-"}),a=Me(function(){return My({contextId:t,uniqueId:r})},[r,t]);return x.useEffect(function(){var l=document.createElement("div");return l.id=a,l.textContent=n,l.style.display="none",eo().appendChild(l),function(){var p=eo();p.contains(l)&&p.removeChild(l)}},[a,n]),a}var Ko=x.createContext(null),Ly={react:"^16.8.5 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.5 || ^17.0.0 || ^18.0.0"},Oy=/(\d+)\.(\d+)\.(\d+)/,fp=function(t){var n=Oy.exec(t);n==null&&(process.env.NODE_ENV!=="production"?K(!1,"Unable to parse React version "+t):K());var r=Number(n[1]),a=Number(n[2]),s=Number(n[3]);return{major:r,minor:a,patch:s,raw:t}},Py=function(t,n){return n.major>t.major?!0:n.major<t.major?!1:n.minor>t.minor?!0:n.minor<t.minor?!1:n.patch>=t.patch},Ry=function(e,t){var n=fp(e),r=fp(t);Py(n,r)||process.env.NODE_ENV!=="production"&&We(`
|
|
451
451
|
React version: [`+r.raw+`]
|
|
452
452
|
does not satisfy expected peer dependency version: [`+n.raw+`]
|
|
453
453
|
|
|
@@ -470,11 +470,11 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
470
470
|
A html5 doctype does not have a publicId
|
|
471
471
|
|
|
472
472
|
`+zs+`
|
|
473
|
-
`)};function js(e){process.env.NODE_ENV!=="production"&&e()}function
|
|
473
|
+
`)};function js(e){process.env.NODE_ENV!=="production"&&e()}function to(e,t){js(function(){x.useEffect(function(){try{e()}catch(n){bs(`
|
|
474
474
|
A setup problem was encountered.
|
|
475
475
|
|
|
476
476
|
> `+n.message+`
|
|
477
|
-
`)}},t)})}function Ay(){
|
|
477
|
+
`)}},t)})}function Ay(){to(function(){Ry(Ly.react,x.version),By(document)},[])}function qs(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e}),t}function Fy(){var e=null;function t(){return!!e}function n(l){return l===e}function r(l){e&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot claim lock as it is already claimed"):K());var c={abandon:l};return e=c,c}function a(){e||(process.env.NODE_ENV!=="production"?K(!1,"Cannot release lock when there is no lock"):K()),e=null}function s(){e&&(e.abandon(),a())}return{isClaimed:t,isActive:n,claim:r,release:a,tryAbandon:s}}var Vy=9,$y=13,Js=27,hp=32,Ky=33,Hy=34,Wy=35,Gy=36,Yy=37,Uy=38,zy=39,jy=40,Ho,qy=(Ho={},Ho[$y]=!0,Ho[Vy]=!0,Ho),Sp=function(e){qy[e.keyCode]&&e.preventDefault()},Wo=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=yn(t,function(r){return"on"+r in document});return n||e}(),gp=0,bp=5;function Jy(e,t){return Math.abs(t.x-e.x)>=bp||Math.abs(t.y-e.y)>=bp}var vp={type:"IDLE"};function Zy(e){var t=e.cancel,n=e.completed,r=e.getPhase,a=e.setPhase;return[{eventName:"mousemove",fn:function(l){var c=l.button,p=l.clientX,m=l.clientY;if(c===gp){var f={x:p,y:m},u=r();if(u.type==="DRAGGING"){l.preventDefault(),u.actions.move(f);return}u.type!=="PENDING"&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot be IDLE"):K());var h=u.point;if(Jy(h,f)){l.preventDefault();var S=u.actions.fluidLift(f);a({type:"DRAGGING",actions:S})}}}},{eventName:"mouseup",fn:function(l){var c=r();if(c.type!=="DRAGGING"){t();return}l.preventDefault(),c.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(l){r().type==="DRAGGING"&&l.preventDefault(),t()}},{eventName:"keydown",fn:function(l){var c=r();if(c.type==="PENDING"){t();return}if(l.keyCode===Js){l.preventDefault(),t();return}Sp(l)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(l){var c=r();if(c.type==="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Unexpected phase"):K()),c.actions.shouldRespectForcePress()){t();return}l.preventDefault()}},{eventName:Wo,fn:t}]}function yp(e){var t=x.useRef(vp),n=x.useRef(bn),r=Me(function(){return{eventName:"mousedown",fn:function(u){if(!u.defaultPrevented&&u.button===gp&&!(u.ctrlKey||u.metaKey||u.shiftKey||u.altKey)){var h=e.findClosestDraggableId(u);if(h){var S=e.tryGetLock(h,l,{sourceEvent:u});if(S){u.preventDefault();var y={x:u.clientX,y:u.clientY};n.current(),m(S,y)}}}}}},[e]),a=Me(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(u){if(!u.defaultPrevented){var h=e.findClosestDraggableId(u);if(h){var S=e.findOptionsForDraggable(h);S&&(S.shouldRespectForcePress||e.canGetLock(h)&&u.preventDefault())}}}}},[e]),s=ge(function(){var u={passive:!1,capture:!0};n.current=Mt(window,[a,r],u)},[a,r]),l=ge(function(){var f=t.current;f.type!=="IDLE"&&(t.current=vp,n.current(),s())},[s]),c=ge(function(){var f=t.current;l(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[l]),p=ge(function(){var u={capture:!0,passive:!1},h=Zy({cancel:c,completed:l,getPhase:function(){return t.current},setPhase:function(y){t.current=y}});n.current=Mt(window,h,u)},[c,l]),m=ge(function(u,h){t.current.type!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Expected to move from IDLE to PENDING drag"):K()),t.current={type:"PENDING",point:h,actions:u},p()},[p]);Dt(function(){return s(),function(){n.current()}},[s])}var gr;function Xy(){}var Qy=(gr={},gr[Hy]=!0,gr[Ky]=!0,gr[Gy]=!0,gr[Wy]=!0,gr);function eT(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(s){if(s.keyCode===Js){s.preventDefault(),n();return}if(s.keyCode===hp){s.preventDefault(),r();return}if(s.keyCode===jy){s.preventDefault(),e.moveDown();return}if(s.keyCode===Uy){s.preventDefault(),e.moveUp();return}if(s.keyCode===zy){s.preventDefault(),e.moveRight();return}if(s.keyCode===Yy){s.preventDefault(),e.moveLeft();return}if(Qy[s.keyCode]){s.preventDefault();return}Sp(s)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Wo,fn:n}]}function Tp(e){var t=x.useRef(Xy),n=Me(function(){return{eventName:"keydown",fn:function(s){if(s.defaultPrevented||s.keyCode!==hp)return;var l=e.findClosestDraggableId(s);if(!l)return;var c=e.tryGetLock(l,f,{sourceEvent:s});if(!c)return;s.preventDefault();var p=!0,m=c.snapLift();t.current();function f(){p||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop capturing a keyboard drag when not capturing"):K()),p=!1,t.current(),r()}t.current=Mt(window,eT(m,f),{capture:!0,passive:!1})}}},[e]),r=ge(function(){var s={passive:!1,capture:!0};t.current=Mt(window,[n],s)},[n]);Dt(function(){return r(),function(){t.current()}},[r])}var Zs={type:"IDLE"},tT=120,nT=.15;function rT(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(a){a.preventDefault()}},{eventName:"keydown",fn:function(a){if(n().type!=="DRAGGING"){t();return}a.keyCode===Js&&a.preventDefault(),t()}},{eventName:Wo,fn:t}]}function oT(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}l.hasMoved=!0;var c=s.touches[0],p=c.clientX,m=c.clientY,f={x:p,y:m};s.preventDefault(),l.actions.move(f)}},{eventName:"touchend",fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}s.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(s){if(r().type!=="DRAGGING"){t();return}s.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(s){var l=r();l.type==="IDLE"&&(process.env.NODE_ENV,K());var c=s.touches[0];if(c){var p=c.force>=nT;if(p){var m=l.actions.shouldRespectForcePress();if(l.type==="PENDING"){m&&t();return}if(m){if(l.hasMoved){s.preventDefault();return}t();return}s.preventDefault()}}}},{eventName:Wo,fn:t}]}function Ep(e){var t=x.useRef(Zs),n=x.useRef(bn),r=ge(function(){return t.current},[]),a=ge(function(S){t.current=S},[]),s=Me(function(){return{eventName:"touchstart",fn:function(S){if(!S.defaultPrevented){var y=e.findClosestDraggableId(S);if(y){var T=e.tryGetLock(y,c,{sourceEvent:S});if(T){var C=S.touches[0],E=C.clientX,N=C.clientY,M={x:E,y:N};n.current(),u(T,M)}}}}}},[e]),l=ge(function(){var S={capture:!0,passive:!1};n.current=Mt(window,[s],S)},[s]),c=ge(function(){var h=t.current;h.type!=="IDLE"&&(h.type==="PENDING"&&clearTimeout(h.longPressTimerId),a(Zs),n.current(),l())},[l,a]),p=ge(function(){var h=t.current;c(),h.type==="DRAGGING"&&h.actions.cancel({shouldBlockNextClick:!0}),h.type==="PENDING"&&h.actions.abort()},[c]),m=ge(function(){var S={capture:!0,passive:!1},y={cancel:p,completed:c,getPhase:r},T=Mt(window,oT(y),S),C=Mt(window,rT(y),S);n.current=function(){T(),C()}},[p,r,c]),f=ge(function(){var S=r();S.type!=="PENDING"&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start dragging from phase "+S.type):K());var y=S.actions.fluidLift(S.point);a({type:"DRAGGING",actions:y,hasMoved:!1})},[r,a]),u=ge(function(S,y){r().type!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Expected to move from IDLE to PENDING drag"):K());var T=setTimeout(f,tT);a({type:"PENDING",point:y,actions:S,longPressTimerId:T}),m()},[m,r,a,f]);Dt(function(){return l(),function(){n.current();var y=r();y.type==="PENDING"&&(clearTimeout(y.longPressTimerId),a(Zs))}},[r,l,a]),Dt(function(){var S=Mt(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return S},[])}function aT(e){js(function(){var t=qs(e);to(function(){t.current.length!==e.length&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot change the amount of sensor hooks after mounting"):K(!1))})})}var sT={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function wp(e,t){if(t==null)return!1;var n=!!sT[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:wp(e,t.parentElement)}function iT(e,t){var n=t.target;return Qr(n)?wp(e,n):!1}var lT=function(e){return At(e.getBoundingClientRect()).center};function cT(e){return e instanceof pp(e).Element}var dT=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=yn(t,function(r){return r in Element.prototype});return n||e}();function Cp(e,t){return e==null?null:e[dT](t)?e:Cp(e.parentElement,t)}function pT(e,t){return e.closest?e.closest(t):Cp(e,t)}function uT(e){return"["+Sr.contextId+'="'+e+'"]'}function mT(e,t){var n=t.target;if(!cT(n))return process.env.NODE_ENV!=="production"&&We("event.target must be a Element"),null;var r=uT(e),a=pT(n,r);return a?Qr(a)?a:(process.env.NODE_ENV!=="production"&&We("drag handle must be a HTMLElement"),null):null}function fT(e,t){var n=mT(e,t);return n?n.getAttribute(Sr.draggableId):null}function hT(e,t){var n="["+Ws.contextId+'="'+e+'"]',r=gd(document.querySelectorAll(n)),a=yn(r,function(s){return s.getAttribute(Ws.id)===t});return a?Qr(a)?a:(process.env.NODE_ENV!=="production"&&We("Draggable element is not a HTMLElement"),null):null}function ST(e){e.preventDefault()}function Go(e){var t=e.expected,n=e.phase,r=e.isLockActive,a=e.shouldWarn;return r()?t!==n?(a&&process.env.NODE_ENV!=="production"&&We(`
|
|
478
478
|
Cannot perform action.
|
|
479
479
|
The actions you used belong to an outdated phase
|
|
480
480
|
|
|
@@ -492,7 +492,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
492
492
|
|
|
493
493
|
- Throw away your action handlers when forceStop() is called
|
|
494
494
|
- Check actions.isActive() if you really need to
|
|
495
|
-
`),!1)}function Dp(e){var t=e.lockAPI,n=e.store,r=e.registry,a=e.draggableId;if(t.isClaimed())return!1;var s=r.draggable.findById(a);return s?!(!s.options.isEnabled||!ep(n.getState(),a)):(process.env.NODE_ENV!=="production"&&We("Unable to find draggable with id: "+a),!1)}function gT(e){var t=e.lockAPI,n=e.contextId,r=e.store,a=e.registry,s=e.draggableId,l=e.forceSensorStop,c=e.sourceEvent,p=Dp({lockAPI:t,store:r,registry:a,draggableId:s});if(!p)return null;var m=a.draggable.getById(s),f=hT(n,m.descriptor.id);if(!f)return process.env.NODE_ENV!=="production"&&We("Unable to find draggable element with id: "+s),null;if(c&&!m.options.canDragInteractiveElements&&iT(f,c))return null;var u=t.claim(l||bn),h="PRE_DRAG";function S(){return m.options.shouldRespectForcePress}function y(){return t.isActive(u)}function T(V,R){Go({expected:V,phase:h,isLockActive:y,shouldWarn:!0})&&r.dispatch(R())}var C=T.bind(null,"DRAGGING");function E(V){function R(){t.release(),h="COMPLETED"}h!=="PRE_DRAG"&&(R(),h!=="PRE_DRAG"&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot lift in phase "+h):K())),r.dispatch(av(V.liftActionArgs)),h="DRAGGING";function w(P,O){if(O===void 0&&(O={shouldBlockNextClick:!1}),V.cleanup(),O.shouldBlockNextClick){var $=Mt(window,[{eventName:"click",fn:ST,options:{once:!0,passive:!1,capture:!0}}]);setTimeout($)}R(),r.dispatch(Gd({reason:P}))}return ye({isActive:function(){return Go({expected:"DRAGGING",phase:h,isLockActive:y,shouldWarn:!1})},shouldRespectForcePress:S,drop:function(O){return w("DROP",O)},cancel:function(O){return w("CANCEL",O)}},V.actions)}function N(V){var R=
|
|
495
|
+
`),!1)}function Dp(e){var t=e.lockAPI,n=e.store,r=e.registry,a=e.draggableId;if(t.isClaimed())return!1;var s=r.draggable.findById(a);return s?!(!s.options.isEnabled||!ep(n.getState(),a)):(process.env.NODE_ENV!=="production"&&We("Unable to find draggable with id: "+a),!1)}function gT(e){var t=e.lockAPI,n=e.contextId,r=e.store,a=e.registry,s=e.draggableId,l=e.forceSensorStop,c=e.sourceEvent,p=Dp({lockAPI:t,store:r,registry:a,draggableId:s});if(!p)return null;var m=a.draggable.getById(s),f=hT(n,m.descriptor.id);if(!f)return process.env.NODE_ENV!=="production"&&We("Unable to find draggable element with id: "+s),null;if(c&&!m.options.canDragInteractiveElements&&iT(f,c))return null;var u=t.claim(l||bn),h="PRE_DRAG";function S(){return m.options.shouldRespectForcePress}function y(){return t.isActive(u)}function T(V,R){Go({expected:V,phase:h,isLockActive:y,shouldWarn:!0})&&r.dispatch(R())}var C=T.bind(null,"DRAGGING");function E(V){function R(){t.release(),h="COMPLETED"}h!=="PRE_DRAG"&&(R(),h!=="PRE_DRAG"&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot lift in phase "+h):K())),r.dispatch(av(V.liftActionArgs)),h="DRAGGING";function w(P,O){if(O===void 0&&(O={shouldBlockNextClick:!1}),V.cleanup(),O.shouldBlockNextClick){var $=Mt(window,[{eventName:"click",fn:ST,options:{once:!0,passive:!1,capture:!0}}]);setTimeout($)}R(),r.dispatch(Gd({reason:P}))}return ye({isActive:function(){return Go({expected:"DRAGGING",phase:h,isLockActive:y,shouldWarn:!1})},shouldRespectForcePress:S,drop:function(O){return w("DROP",O)},cancel:function(O){return w("CANCEL",O)}},V.actions)}function N(V){var R=Vr(function(P){C(function(){return Wd({client:P})})}),w=E({liftActionArgs:{id:s,clientSelection:V,movementMode:"FLUID"},cleanup:function(){return R.cancel()},actions:{move:R}});return ye({},w,{move:R})}function M(){var V={moveUp:function(){return C(fv)},moveRight:function(){return C(Sv)},moveDown:function(){return C(hv)},moveLeft:function(){return C(gv)}};return E({liftActionArgs:{id:s,clientSelection:lT(f),movementMode:"SNAP"},cleanup:bn,actions:V})}function I(){var V=Go({expected:"PRE_DRAG",phase:h,isLockActive:y,shouldWarn:!0});V&&t.release()}var k={isActive:function(){return Go({expected:"PRE_DRAG",phase:h,isLockActive:y,shouldWarn:!1})},shouldRespectForcePress:S,fluidLift:N,snapLift:M,abort:I};return k}var bT=[yp,Tp,Ep];function vT(e){var t=e.contextId,n=e.store,r=e.registry,a=e.customSensors,s=e.enableDefaultSensors,l=[].concat(s?bT:[],a||[]),c=x.useState(function(){return Fy()})[0],p=ge(function(N,M){N.isDragging&&!M.isDragging&&c.tryAbandon()},[c]);Dt(function(){var N=n.getState(),M=n.subscribe(function(){var I=n.getState();p(N,I),N=I});return M},[c,n,p]),Dt(function(){return c.tryAbandon},[c.tryAbandon]);var m=ge(function(E){return Dp({lockAPI:c,registry:r,store:n,draggableId:E})},[c,r,n]),f=ge(function(E,N,M){return gT({lockAPI:c,registry:r,contextId:t,store:n,draggableId:E,forceSensorStop:N,sourceEvent:M&&M.sourceEvent?M.sourceEvent:null})},[t,c,r,n]),u=ge(function(E){return fT(t,E)},[t]),h=ge(function(E){var N=r.draggable.findById(E);return N?N.options:null},[r.draggable]),S=ge(function(){c.isClaimed()&&(c.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(_s()))},[c,n]),y=ge(c.isClaimed,[c]),T=Me(function(){return{canGetLock:m,tryGetLock:f,findClosestDraggableId:u,findOptionsForDraggable:h,tryReleaseLock:S,isLockClaimed:y}},[m,f,u,h,S,y]);aT(l);for(var C=0;C<l.length;C++)l[C](T)}var yT=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function no(e){return e.current||(process.env.NODE_ENV!=="production"?K(!1,"Could not find store from lazy ref"):K()),e.current}function TT(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,a=e.nonce,s=e.dragHandleUsageInstructions,l=x.useRef(null);Ay();var c=qs(e),p=ge(function(){return yT(c.current)},[c]),m=ky(t),f=_y({contextId:t,text:s}),u=Ty(t,a),h=ge(function(P){no(l).dispatch(P)},[]),S=Me(function(){return Cc({publishWhileDragging:iv,updateDroppableScroll:cv,updateDroppableIsEnabled:dv,updateDroppableIsCombineEnabled:pv,collectionStarting:lv},h)},[h]),y=Cy(),T=Me(function(){return Qv(y,S)},[y,S]),C=Me(function(){return Sy(ye({scrollWindow:ey,scrollDroppable:T.scrollDroppable},Cc({move:Wd},h)))},[T.scrollDroppable,h]),E=Ey(t),N=Me(function(){return qv({announce:m,autoScroller:C,dimensionMarshal:T,focusMarshal:E,getResponders:p,styleMarshal:u})},[m,C,T,E,p,u]);process.env.NODE_ENV!=="production"&&l.current&&l.current!==N&&process.env.NODE_ENV!=="production"&&We("unexpected store change"),l.current=N;var M=ge(function(){var P=no(l),O=P.getState();O.phase!=="IDLE"&&P.dispatch(_s())},[]),I=ge(function(){var P=no(l).getState();return P.isDragging||P.phase==="DROP_ANIMATING"},[]),k=Me(function(){return{isDragging:I,tryAbort:M}},[I,M]);n(k);var V=ge(function(P){return ep(no(l).getState(),P)},[]),R=ge(function(){return Hn(no(l).getState())},[]),w=Me(function(){return{marshal:T,focus:E,contextId:t,canLift:V,isMovementAllowed:R,dragHandleUsageInstructionsId:f,registry:y}},[t,T,f,E,V,R,y]);return vT({contextId:t,store:N,registry:y,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),x.useEffect(function(){return M},[M]),x.createElement(Ko.Provider,{value:w},x.createElement(Vc,{context:Ys,store:N},e.children))}var Np=0;function ET(){Np=0}function wT(){return Me(function(){return""+Np++},[])}function CT(){ET(),xy()}function kp(e){var t=wT(),n=e.dragHandleUsageInstructions||Oo.dragHandleUsageInstructions;return x.createElement(jg,null,function(r){return x.createElement(TT,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var Xs=function(t){return function(n){return t===n}},DT=Xs("scroll"),NT=Xs("auto"),kT=Xs("visible"),Ip=function(t,n){return n(t.overflowX)||n(t.overflowY)},IT=function(t,n){return n(t.overflowX)&&n(t.overflowY)},xp=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return Ip(r,DT)||Ip(r,NT)},xT=function(){if(process.env.NODE_ENV==="production")return!1;var t=eo(),n=document.documentElement;if(n||(process.env.NODE_ENV,K()),!xp(t))return!1;var r=window.getComputedStyle(n),a={overflowX:r.overflowX,overflowY:r.overflowY};return IT(a,kT)||process.env.NODE_ENV!=="production"&&We(`
|
|
496
496
|
We have detected that your <body> element might be a scroll container.
|
|
497
497
|
We have found no reliable way of detecting whether the <body> element is a scroll container.
|
|
498
498
|
Under most circumstances a <body> scroll bar will be on the <html> element (document.documentElement)
|
|
@@ -507,7 +507,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
507
507
|
Nested scroll containers are currently not supported.
|
|
508
508
|
|
|
509
509
|
We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131
|
|
510
|
-
`)}},Qs=function(e){return{x:e.scrollLeft,y:e.scrollTop}},_T=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},LT=function(e){var t=Mp(e),n=_T(e);return{closestScrollable:t,isFixedOnPage:n}},OT=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,a=e.isFixedOnPage,s=e.direction,l=e.client,c=e.page,p=e.closest,m=function(){if(!p)return null;var S=p.scrollSize,y=p.client,T=Jd({scrollHeight:S.scrollHeight,scrollWidth:S.scrollWidth,height:y.paddingBox.height,width:y.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:y,scrollSize:S,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:T,diff:{value:rt,displacement:rt}}}}(),f=s==="vertical"?Es:Ed,u=mr({page:c,withPlaceholder:null,axis:f,frame:m}),h={descriptor:t,isCombineEnabled:r,isFixedOnPage:a,axis:f,isEnabled:n,client:l,page:c,frame:m,subject:u};return h},PT=function(t,n){var r=sd(t);if(!n||t!==n)return r;var a=r.paddingBox.top-n.scrollTop,s=r.paddingBox.left-n.scrollLeft,l=a+n.scrollHeight,c=s+n.scrollWidth,p={top:a,right:c,bottom:l,left:s},m=hs(p,r.border),f=gs({borderBox:m,margin:r.margin,border:r.border,padding:r.padding});return f},RT=function(e){var t=e.ref,n=e.descriptor,r=e.env,a=e.windowScroll,s=e.direction,l=e.isDropDisabled,c=e.isCombineEnabled,p=e.shouldClipSubject,m=r.closestScrollable,f=PT(t,m),u=_o(f,a),h=function(){if(!m)return null;var y=sd(m),T={scrollHeight:m.scrollHeight,scrollWidth:m.scrollWidth};return{client:y,page:_o(y,a),scroll:Qs(m),scrollSize:T,shouldClipSubject:p}}(),S=OT({descriptor:n,isEnabled:!l,isCombineEnabled:c,isFixedOnPage:r.isFixedOnPage,direction:s,client:f,page:u,closest:h});return S},BT={passive:!1},AT={passive:!0},_p=function(e){return e.shouldPublishImmediately?BT:AT};function Yo(e){var t=x.useContext(e);return t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find required context"):K()),t}var Uo=function(t){return t&&t.env.closestScrollable||null};function FT(e){var t=x.useRef(null),n=Yo(Ko),r=Us("droppable"),a=n.registry,s=n.marshal,l=qs(e),c=Me(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),p=x.useRef(c),m=Me(function(){return nt(function(I,k){t.current||(process.env.NODE_ENV!=="production"?K(!1,"Can only update scroll when dragging"):K());var V={x:I,y:k};s.updateDroppableScroll(c.id,V)})},[c.id,s]),f=ge(function(){var I=t.current;return!I||!I.env.closestScrollable?rt:Qs(I.env.closestScrollable)},[]),u=ge(function(){var I=f();m(I.x,I.y)},[f,m]),h=Me(function(){return
|
|
510
|
+
`)}},Qs=function(e){return{x:e.scrollLeft,y:e.scrollTop}},_T=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},LT=function(e){var t=Mp(e),n=_T(e);return{closestScrollable:t,isFixedOnPage:n}},OT=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,a=e.isFixedOnPage,s=e.direction,l=e.client,c=e.page,p=e.closest,m=function(){if(!p)return null;var S=p.scrollSize,y=p.client,T=Jd({scrollHeight:S.scrollHeight,scrollWidth:S.scrollWidth,height:y.paddingBox.height,width:y.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:y,scrollSize:S,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:T,diff:{value:rt,displacement:rt}}}}(),f=s==="vertical"?Es:Ed,u=mr({page:c,withPlaceholder:null,axis:f,frame:m}),h={descriptor:t,isCombineEnabled:r,isFixedOnPage:a,axis:f,isEnabled:n,client:l,page:c,frame:m,subject:u};return h},PT=function(t,n){var r=sd(t);if(!n||t!==n)return r;var a=r.paddingBox.top-n.scrollTop,s=r.paddingBox.left-n.scrollLeft,l=a+n.scrollHeight,c=s+n.scrollWidth,p={top:a,right:c,bottom:l,left:s},m=hs(p,r.border),f=gs({borderBox:m,margin:r.margin,border:r.border,padding:r.padding});return f},RT=function(e){var t=e.ref,n=e.descriptor,r=e.env,a=e.windowScroll,s=e.direction,l=e.isDropDisabled,c=e.isCombineEnabled,p=e.shouldClipSubject,m=r.closestScrollable,f=PT(t,m),u=_o(f,a),h=function(){if(!m)return null;var y=sd(m),T={scrollHeight:m.scrollHeight,scrollWidth:m.scrollWidth};return{client:y,page:_o(y,a),scroll:Qs(m),scrollSize:T,shouldClipSubject:p}}(),S=OT({descriptor:n,isEnabled:!l,isCombineEnabled:c,isFixedOnPage:r.isFixedOnPage,direction:s,client:f,page:u,closest:h});return S},BT={passive:!1},AT={passive:!0},_p=function(e){return e.shouldPublishImmediately?BT:AT};function Yo(e){var t=x.useContext(e);return t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find required context"):K()),t}var Uo=function(t){return t&&t.env.closestScrollable||null};function FT(e){var t=x.useRef(null),n=Yo(Ko),r=Us("droppable"),a=n.registry,s=n.marshal,l=qs(e),c=Me(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),p=x.useRef(c),m=Me(function(){return nt(function(I,k){t.current||(process.env.NODE_ENV!=="production"?K(!1,"Can only update scroll when dragging"):K());var V={x:I,y:k};s.updateDroppableScroll(c.id,V)})},[c.id,s]),f=ge(function(){var I=t.current;return!I||!I.env.closestScrollable?rt:Qs(I.env.closestScrollable)},[]),u=ge(function(){var I=f();m(I.x,I.y)},[f,m]),h=Me(function(){return Vr(u)},[u]),S=ge(function(){var I=t.current,k=Uo(I);I&&k||(process.env.NODE_ENV!=="production"?K(!1,"Could not find scroll options while scrolling"):K());var V=I.scrollOptions;if(V.shouldPublishImmediately){u();return}h()},[h,u]),y=ge(function(I,k){t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot collect a droppable while a drag is occurring"):K());var V=l.current,R=V.getDroppableRef();R||(process.env.NODE_ENV!=="production"?K(!1,"Cannot collect without a droppable ref"):K());var w=LT(R),P={ref:R,descriptor:c,env:w,scrollOptions:k};t.current=P;var O=RT({ref:R,descriptor:c,env:w,windowScroll:I,direction:V.direction,isDropDisabled:V.isDropDisabled,isCombineEnabled:V.isCombineEnabled,shouldClipSubject:!V.ignoreContainerClipping}),$=w.closestScrollable;return $&&($.setAttribute(cp.contextId,n.contextId),$.addEventListener("scroll",S,_p(P.scrollOptions)),process.env.NODE_ENV!=="production"&&MT($)),O},[n.contextId,c,S,l]),T=ge(function(){var I=t.current,k=Uo(I);return I&&k||(process.env.NODE_ENV!=="production"?K(!1,"Can only recollect Droppable client for Droppables that have a scroll container"):K()),Qs(k)},[]),C=ge(function(){var I=t.current;I||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop drag when no active drag"):K());var k=Uo(I);t.current=null,k&&(h.cancel(),k.removeAttribute(cp.contextId),k.removeEventListener("scroll",S,_p(I.scrollOptions)))},[S,h]),E=ge(function(I){var k=t.current;k||(process.env.NODE_ENV!=="production"?K(!1,"Cannot scroll when there is no drag"):K());var V=Uo(k);V||(process.env.NODE_ENV!=="production"?K(!1,"Cannot scroll a droppable with no closest scrollable"):K()),V.scrollTop+=I.y,V.scrollLeft+=I.x},[]),N=Me(function(){return{getDimensionAndWatchScroll:y,getScrollWhileDragging:T,dragStopped:C,scroll:E}},[C,y,T,E]),M=Me(function(){return{uniqueId:r,descriptor:c,callbacks:N}},[N,c,r]);Dt(function(){return p.current=M.descriptor,a.droppable.register(M),function(){t.current&&(process.env.NODE_ENV!=="production"&&We("Unsupported: changing the droppableId or type of a Droppable during a drag"),C()),a.droppable.unregister(M)}},[N,c,C,M,s,a.droppable]),Dt(function(){t.current&&s.updateDroppableIsEnabled(p.current.id,!e.isDropDisabled)},[e.isDropDisabled,s]),Dt(function(){t.current&&s.updateDroppableIsCombineEnabled(p.current.id,e.isCombineEnabled)},[e.isCombineEnabled,s])}function ei(){}var Lp={width:0,height:0,margin:eb},VT=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,a=t.animate;return n||a==="close"?Lp:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},$T=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,a=t.animate,s=VT({isAnimatingOpenOnMount:n,placeholder:r,animate:a});return{display:r.display,boxSizing:"border-box",width:s.width,height:s.height,marginTop:s.margin.top,marginRight:s.margin.right,marginBottom:s.margin.bottom,marginLeft:s.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:a!=="none"?Jr.placeholder:null}};function KT(e){var t=x.useRef(null),n=ge(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,a=e.onTransitionEnd,s=e.onClose,l=e.contextId,c=x.useState(e.animate==="open"),p=c[0],m=c[1];x.useEffect(function(){return p?r!=="open"?(n(),m(!1),ei):t.current?ei:(t.current=setTimeout(function(){t.current=null,m(!1)}),n):ei},[r,p,n]);var f=ge(function(h){h.propertyName==="height"&&(a(),r==="close"&&s())},[r,s,a]),u=$T({isAnimatingOpenOnMount:p,animate:e.animate,placeholder:e.placeholder});return x.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":l,onTransitionEnd:f,ref:e.innerRef})}var HT=x.memo(KT),ti=x.createContext(null);function Op(e){e&&Qr(e)||(process.env.NODE_ENV!=="production"?K(!1,`
|
|
511
511
|
provided.innerRef has not been provided with a HTMLElement.
|
|
512
512
|
|
|
513
513
|
You can find a guide on using the innerRef callback functions at:
|
|
@@ -518,8 +518,8 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
518
518
|
|
|
519
519
|
Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.
|
|
520
520
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/api/droppable.md
|
|
521
|
-
`)}}],YT=[function(t){var n=t.props;n.renderClone||(process.env.NODE_ENV!=="production"?K(!1,"Must provide a clone render function (renderClone) for virtual lists"):K())},function(t){var n=t.getPlaceholderRef;n()&&(process.env.NODE_ENV!=="production"?K(!1,"Expected virtual list to not have a placeholder"):K())}];function UT(e){
|
|
522
|
-
Provided: [type: `+typeof a+"] (value: "+a+")"):K(!1)),ob(e.index)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" requires an integer index prop"):K(!1)),e.mapped.type!=="DRAGGING"&&(Op(n()),e.isEnabled&&(up(t,a)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" Unable to find drag handle"):K(!1))))})}function rE(e){js(function(){var t=x.useRef(e);eo(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Draggable isClone prop value changed during component life"):K(!1))},[e])})}function oE(e){e.preventDefault()}function aE(e){var t=x.useRef(null),n=ge(function(P){t.current=P},[]),r=ge(function(){return t.current},[]),a=Yo(Ko),s=a.contextId,l=a.dragHandleUsageInstructionsId,c=a.registry,p=Yo(ti),m=p.type,f=p.droppableId,u=Me(function(){return{id:e.draggableId,index:e.index,type:m,droppableId:f}},[e.draggableId,e.index,m,f]),h=e.children,S=e.draggableId,y=e.isEnabled,T=e.shouldRespectForcePress,C=e.canDragInteractiveElements,E=e.isClone,N=e.mapped,M=e.dropAnimationFinished;if(nE(e,s,r),rE(E),!E){var I=Me(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:C,shouldRespectForcePress:T,isEnabled:y}},[u,c,r,C,T,y]);tE(I)}var k=Me(function(){return y?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":S,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:oE}:null},[s,l,S,y]),V=ge(function(P){N.type==="DRAGGING"&&N.dropping&&P.propertyName==="transform"&&M()},[M,N]),R=Me(function(){var P=QT(N),O=N.type==="DRAGGING"&&N.dropping?V:null,$={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":S,style:P,onTransitionEnd:O},dragHandleProps:k};return $},[s,k,S,N,V,n]),w=Me(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return h(R,N.snapshot,w)}var Rp=function(e,t){return e===t},Bp=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},sE=function(t){return t.combine?t.combine.draggableId:null},iE=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function lE(){var e=nt(function(a,s){return{x:a,y:s}}),t=nt(function(a,s,l,c,p){return{isDragging:!0,isClone:s,isDropAnimating:!!p,dropAnimation:p,mode:a,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=nt(function(a,s,l,c,p,m,f){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:m,mode:s,offset:a,dimension:l,forceShouldAnimate:f,snapshot:t(s,c,p,m,null)}}}),r=function(s,l){if(s.isDragging){if(s.critical.draggable.id!==l.draggableId)return null;var c=s.current.client.offset,p=s.dimensions.draggables[l.draggableId],m=Ct(s.impact),f=iE(s.impact),u=s.forceShouldAnimate;return n(e(c.x,c.y),s.movementMode,p,l.isClone,m,f,u)}if(s.phase==="DROP_ANIMATING"){var h=s.completed;if(h.result.draggableId!==l.draggableId)return null;var S=l.isClone,y=s.dimensions.draggables[l.draggableId],T=h.result,C=T.mode,E=Bp(T),N=sE(T),M=s.dropDuration,I={duration:M,curve:Os.drop,moveTo:s.newHomeClientOffset,opacity:N?jr.opacity.drop:null,scale:N?jr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:s.newHomeClientOffset,dimension:y,dropping:I,draggingOver:E,combineWith:N,mode:C,forceShouldAnimate:null,snapshot:t(C,S,E,N,I)}}}return null};return r}function Ap(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var cE={mapped:{type:"SECONDARY",offset:rt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ap(null)}};function dE(){var e=nt(function(l,c){return{x:l,y:c}}),t=nt(Ap),n=nt(function(l,c,p){return c===void 0&&(c=null),{mapped:{type:"SECONDARY",offset:l,combineTargetFor:c,shouldAnimateDisplacement:p,snapshot:t(c)}}}),r=function(c){return c?n(rt,c,!0):null},a=function(c,p,m,f){var u=m.displaced.visible[c],h=!!(f.inVirtualList&&f.effected[c]),S=Bo(m),y=S&&S.draggableId===c?p:null;if(!u){if(!h)return r(y);if(m.displaced.invisible[c])return null;var T=ur(f.displacedBy.point),C=e(T.x,T.y);return n(C,y,!0)}if(h)return r(y);var E=m.displacedBy.point,N=e(E.x,E.y);return n(N,y,u.shouldAnimate)},s=function(c,p){if(c.isDragging)return c.critical.draggable.id===p.draggableId?null:a(p.draggableId,c.critical.draggable.id,c.impact,c.afterCritical);if(c.phase==="DROP_ANIMATING"){var m=c.completed;return m.result.draggableId===p.draggableId?null:a(p.draggableId,m.result.draggableId,m.impact,m.afterCritical)}return null};return s}var pE=function(){var t=lE(),n=dE(),r=function(s,l){return t(s,l)||n(s,l)||cE};return r},uE={dropAnimationFinished:Yd},mE=td(pE,uE,null,{context:Ys,pure:!0,areStatePropsEqual:Rp})(aE);function Fp(e){var t=Yo(ti),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:x.createElement(mE,e)}function Vp(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return x.createElement(Fp,ye({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function fE(e){var t=x.useContext(Ko);t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find app context"):K());var n=t.contextId,r=t.isMovementAllowed,a=x.useRef(null),s=x.useRef(null),l=e.children,c=e.droppableId,p=e.type,m=e.mode,f=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,S=e.isCombineEnabled,y=e.snapshot,T=e.useClone,C=e.updateViewportMaxScroll,E=e.getContainerForClone,N=ge(function(){return a.current},[]),M=ge(function(J){a.current=J},[]),I=ge(function(){return s.current},[]),k=ge(function(J){s.current=J},[]);UT({props:e,getDroppableRef:N,getPlaceholderRef:I});var V=ge(function(){r()&&C({maxScroll:Xd()})},[r,C]);FT({droppableId:c,type:p,mode:m,direction:f,isDropDisabled:h,isCombineEnabled:S,ignoreContainerClipping:u,getDroppableRef:N});var R=x.createElement(zT,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(J){var L=J.onClose,Z=J.data,A=J.animate;return x.createElement(HT,{placeholder:Z,onClose:L,innerRef:k,animate:A,contextId:n,onTransitionEnd:V})}),w=Me(function(){return{innerRef:M,placeholder:R,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,R,M]),P=T?T.dragging.draggableId:null,O=Me(function(){return{droppableId:c,type:p,isUsingCloneFor:P}},[c,P,p]);function $(){if(!T)return null;var J=T.dragging,L=T.render,Z=x.createElement(Fp,{draggableId:J.draggableId,index:J.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(A,ne){return L(A,ne,J)});return bo.createPortal(Z,E())}return x.createElement(ti.Provider,{value:O},l(w,y),$())}var oi=function(t,n){return t===n.droppable.type},$p=function(t,n){return n.draggables[t.draggable.id]},hE=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ye({},t,{shouldAnimatePlaceholder:!1}),r=nt(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),a=nt(function(l,c,p,m,f,u){var h=f.descriptor.id,S=f.descriptor.droppableId===l;if(S){var y=u?{render:u,dragging:r(f.descriptor)}:null,T={isDraggingOver:p,draggingOverWith:p?h:null,draggingFromThisWith:h,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!1,snapshot:T,useClone:y}}if(!c)return n;if(!m)return t;var C={isDraggingOver:p,draggingOverWith:h,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!0,snapshot:C,useClone:null}}),s=function(c,p){var m=p.droppableId,f=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var S=c.critical;if(!oi(f,S))return n;var y=$p(S,c.dimensions),T=Ct(c.impact)===m;return a(m,u,T,T,y,h)}if(c.phase==="DROP_ANIMATING"){var C=c.completed;if(!oi(f,C.critical))return n;var E=$p(C.critical,c.dimensions);return a(m,u,Bp(C.result)===m,Ct(C.impact)===m,E,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var N=c.completed;if(!oi(f,N.critical))return n;var M=Ct(N.impact)===m,I=!!(N.impact.at&&N.impact.at.type==="COMBINE"),k=N.critical.droppable.id===m;return M?I?t:n:k?t:n}return n};return s},SE={updateViewportMaxScroll:mv};function gE(){return document.body||(process.env.NODE_ENV!=="production"?K(!1,"document.body is not ready"):K()),document.body}var bE={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:gE},ai=td(hE,SE,null,{context:Ys,pure:!0,areStatePropsEqual:Rp})(fE);ai.defaultProps=bE;const vE={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function Ue(e){const{children:t,className:n,href:r,icon:a,kind:s=W.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=W.ButtonType.BUTTON,unsafelyReplaceClassName:m,...f}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=o.useContext(He),S=G(m||"sps-button",`sps-button--${s}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),y=a&&o.createElement("i",{className:G("sps-icon",`sps-icon-${a}`),"aria-hidden":"true"}),T=l&&o.createElement("div",{className:"sps-spinner"},c||h("design-system:button.spinningTitle"));return o.createElement("div",{className:S},r?o.createElement("a",{...f,href:r,className:"sps-button__clickable-element"},y,t,T):o.createElement("button",{...f,type:p,className:"sps-button__clickable-element",disabled:u},y,t,T))}Object.assign(Ue,{props:vE,displayName:"SpsButton"});const yE={content:"ReactNodeLike",icon:"SpsIcon",title:"string"};function Kp(e){const{content:t,className:n,icon:r,title:a,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=G(l||"sps-card__header",n);return o.createElement("div",{className:p,title:a,...c},o.createElement("div",{className:"sps-card__title"}," ",r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`})," ",a),o.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(Kp,{props:yE,displayName:"SpsCardHeader"});const TE={icon:"SpsIcon",kind:"TagKind"};function Ft(e){const{children:t,className:n,icon:r,kind:a=W.TagKind.DEFAULT,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=o.Children.toArray(t).filter(f=>typeof f=="string").join(""),m=G(l||"sps-tag",`sps-tag--${a}`,n);return o.createElement("span",{className:m,"data-testid":`${s}__tag`,title:p,...c},r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`,"data-testid":`${s}__icon`}),t)}Object.assign(Ft,{props:TE,displayName:"SpsTag"});const EE={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function si(e){const{activateTab:t,active:n,children:r,className:a,label:s,icon:l,id:c,index:p=0,tag:m,tagKind:f,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:S,...y}=e,T=()=>{t&&t(this,p,r)},C=N=>{(N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),N.stopPropagation(),t&&t(this,p,r))},E=G(S||"sps-nav__item","sps-nav__link",n&&"active",a);return o.createElement("a",{className:E,onClick:T,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...y,tabIndex:0,onKeyDown:C},l&&o.createElement("i",{className:`sps-icon sps-icon-${l}`}),o.createElement("span",null,s),m&&o.createElement(Ft,{kind:f||W.TagKind.KEY,icon:u},m))}Object.assign(si,{props:EE,displayName:"SpsCardTabbedPane"});function wE(e,t,n){const[r,a]=o.useState({index:0,content:null}),s=o.useCallback((l,c,p)=>{a({index:c,content:p})},[]);return o.useEffect(()=>{function l(m){for(const f of m){const u=f.props;a({...r,content:u.children});break}}function c(m,f){for(let u=0;u<=m.length;u+=1){const h=m[u];if(h&&h.props&&(h.props.id&&h.props.id===f||h.props.label&&h.props.label===f)){a({content:h.props.children,index:u});break}}}const p=o.Children.toArray(e);n&&t?c(p,t):n&&l(p)},[t,e]),[r,s]}const CE={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function ii(e){o.useEffect(()=>{console.log(["App developers: There's a new card component! Update for improved performance,","fewer bugs, and increased flexibility. Reach out to the design system help Slack","channel if you have any questions!"].join(" "))},[]);const{activeTab:t,children:n,className:r,footer:a,headerContent:s,headerIcon:l,headerTitle:c,"data-testid":p,unsafelyReplaceClassName:m,...f}=e,u=o.Children.toArray(n).some(T=>o.isValidElement(T)&&T.type===si),[h,S]=wE(n,t,u),y=G(m||"sps-card",r);return o.createElement("div",{...f,className:y,"data-testid":`${p}__card`},(c||s)&&o.createElement(Kp,{title:c,content:vt(s),icon:l,"data-testid":`${p}__header`}),u===!0?o.createElement(o.Fragment,null,o.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},o.Children.map(n,(T,C)=>{if(o.isValidElement(T))return o.cloneElement(T,{active:C===h.index,index:C,activateTab:S,"data-testid":`${p}__tab`})})),o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},h.content)):o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),a&&o.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},vt(a)))}Object.assign(ii,{props:CE,displayName:"SpsCard"});function li(e,t){const[n,...r]=v.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function DE(e=[],t={}){return{validators:[],...t,_type:"Array",members:[...e],errors:null,invalid:!1,isValid(){const n=this;return!n.invalid&&n.members.every(r=>r.isValid())},isRequired(){const n=this;return n.validators&&n.validators.indexOf(To.required)>-1},hasError(n){const r=this;return r.errors&&Object.prototype.hasOwnProperty.call(r.errors,n)},length:e.length,setInitValue(n){for(const[r,a]of this.members.entries())a.setInitValue(n[r]);return this},getValue(){return this.members.map(n=>n.getValue())},setValue(n=[]){for(const[r,a]of this.members.entries())a.setValue(n[r]);return this},update(){return this},isFocused(){return this.members.some(n=>n.isFocused())},focus(){const n=this;return n.members.length&&n.members[0].focus(),this},blur(){for(const n of this.members)n.blur();return this},isPristine(){return this.members.every(n=>n.isPristine())},markAsPristine(){for(const n of this.members)n.markAsPristine();return this},markAsDirty(){for(const n of this.members)n.markAsDirty();return this},reset(n){const r=this;r.members=[...e],r.length=e.length;for(const[a,s]of r.members.entries())n&&a<n.length?s.reset(n[a]):s.reset();return r.update(),this},get(n){return li(this,n)},at(n){return this.members[n]},push(n){const r=this;return r.members.push(n),r.length=r.members.length,r.update(),this},insert(n,r){const a=this;return a.members.splice(n,0,r),a.length=a.members.length,a.update(),this},removeAt(n){const r=this;return r.members.splice(n,1),r.length=r.members.length,r.update(),this},setControl(n,r){const a=this;return a.members[n]=r,a.update(),this}}}function NE(e,t={}){return{validators:[],id:ft(),...t,_type:"Control",initValue:e,setInitValue(n){return this.value=n,this.initValue=n,this},value:e,getValue(){return this.value},setValue(n){return this.value=n,this.update(),this},errors:null,invalid:!1,isValid(){return!this.invalid},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},focused:!1,isFocused(){return this.focused},pristine:!0,isPristine(){return this.pristine},isRequired(){return this.validators&&this.validators.indexOf(To.required)>-1},update(){return this},focus(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this},blur(){return this.focused=!1,this.update(),this.onBlur&&this.onBlur(),this},markAsPristine(){return this.pristine=!0,this.update(),this},markAsDirty(){return this.pristine=!1,this.update(),this},reset(n=this.initValue){return this.value=n,this.pristine=!0,this.update(),this}}}function kE(e={},t={}){return{validators:[],...t,_type:"Group",members:{...e},errors:null,invalid:!1,isValid(){return!this.invalid&&Object.keys(this.members).every(n=>this.members[n].isValid())},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},setInitValue(n={}){for(const r of Object.keys(this.members))this.members[r].setInitValue(n[r]);return this},getValue(){return Object.keys(this.members).reduce((n,r)=>Object.assign(n,{[r]:this.members[r].getValue()}),{})},setValue(n={}){for(const r of Object.keys(this.members))this.members[r].setValue(n[r]);return this},update(){return this},isFocused(){return Object.keys(this.members).some(n=>this.members[n].isFocused())},focus(){const n=Object.keys(this.members);return n.length&&this.members[n[0]].focus(),this},blur(){for(const n of Object.keys(this.members))this.members[n].blur();return this},isPristine(){return Object.keys(this.members).every(n=>this.members[n].isPristine())},markAsPristine(){for(const n of Object.keys(this.members))this.members[n].markAsPristine();return this},markAsDirty(){for(const n of Object.keys(this.members))this.members[n].markAsDirty();return this},reset(n){this.members={...e};for(const r of Object.keys(this.members))n&&Object.prototype.hasOwnProperty.call(n,r)?this.members[r].reset(n[r]):this.members[r].reset();return this.update(),this},get(n){return li(this,n)},addControl(n,r){if(this.contains(n))throw new Error(`Form group already contains a control called "${n}".`);return this.members[n]=r,this.update(),this},removeControl(n){return delete this.members[n],this.update(),this},setControl(n,r){return this.members[n]=r,this.update(),this},contains(n){return Object.keys(this.members).indexOf(n)>-1}}}function IE(e,t){t&&e.setInitValue(t);const[n,r]=x.useState(),[a,s]=x.useState([]),[l,c]=x.useReducer(p=>{for(const m of a)for(const f of v.traversePath(p,m))f.validators&&f.validators.length&&(f.errors=Eo(f.getValue(),f.validators),f.invalid=!!f.errors&&!f.pristine);return r(void 0),s([]),{...p}},e);return v.forEachNestedObject(l,(p,m)=>{m._type&&(m.update=function(){return a.push(p),s(a),n||r(window.setTimeout(c,0)),this})}),l}function xE(e,t=null){const[n,r]=x.useState(t),a=x.useRef(()=>null);return x.useEffect(()=>{const s=()=>n;if(e.validators){const l=e.validators.indexOf(a.current);l===-1?e.validators.push(s):e.validators[l]=s,e.update(),a.current=s}},[n]),[n,r]}const Hp={formMeta:"SpsFormSetMeta<any>",onSubmit:"React.FormEventHandler"},no=o.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:a,formGroup:s,formMeta:l,...c}=e,p=s||a;function m(f){f.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(f)}return o.createElement("form",{ref:t,onSubmit:m,...c},n)});Object.assign(no,{props:Hp,displayName:"SpsForm"});const Wp={},ME={ideal:{label:"Ideal",examples:{ideal:{react:v.code`
|
|
521
|
+
`)}}],YT=[function(t){var n=t.props;n.renderClone||(process.env.NODE_ENV!=="production"?K(!1,"Must provide a clone render function (renderClone) for virtual lists"):K())},function(t){var n=t.getPlaceholderRef;n()&&(process.env.NODE_ENV!=="production"?K(!1,"Expected virtual list to not have a placeholder"):K())}];function UT(e){to(function(){ri(e,WT),e.props.mode==="standard"&&ri(e,GT),e.props.mode==="virtual"&&ri(e,YT)})}var zT=function(e){gc(t,e);function t(){for(var r,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||this,r.state={isVisible:!!r.props.on,data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(a,s){return a.shouldAnimate?a.on?{isVisible:!0,data:a.on,animate:"open"}:s.isVisible?{isVisible:!0,data:s.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!a.on,data:a.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var a={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(a)},t}(x.PureComponent),Pp={dragging:5e3,dropAnimating:4500},jT=function(t,n){return n?Jr.drop(n.duration):t?Jr.snap:Jr.fluid},qT=function(t,n){return t?n?qr.opacity.drop:qr.opacity.combining:null},JT=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function ZT(e){var t=e.dimension,n=t.client,r=e.offset,a=e.combineWith,s=e.dropping,l=!!a,c=JT(e),p=!!s,m=p?Rs.drop(r,l):Rs.moveTo(r),f={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:jT(c,s),transform:m,opacity:qT(l,p),zIndex:p?Pp.dropAnimating:Pp.dragging,pointerEvents:"none"};return f}function XT(e){return{transform:Rs.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function QT(e){return e.type==="DRAGGING"?ZT(e):XT(e)}function eE(e,t,n){n===void 0&&(n=rt);var r=window.getComputedStyle(t),a=t.getBoundingClientRect(),s=ad(a,r),l=_o(s,n),c={client:s,tagName:t.tagName.toLowerCase(),display:r.display},p={x:s.marginBox.width,y:s.marginBox.height},m={descriptor:e,placeholder:c,displaceBy:p,client:s,page:l};return m}function tE(e){var t=Us("draggable"),n=e.descriptor,r=e.registry,a=e.getDraggableRef,s=e.canDragInteractiveElements,l=e.shouldRespectForcePress,c=e.isEnabled,p=Me(function(){return{canDragInteractiveElements:s,shouldRespectForcePress:l,isEnabled:c}},[s,c,l]),m=ge(function(S){var y=a();return y||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get dimension when no ref is set"):K()),eE(n,y,S)},[n,a]),f=Me(function(){return{uniqueId:t,descriptor:n,options:p,getDimension:m}},[n,m,p,t]),u=x.useRef(f),h=x.useRef(!0);Dt(function(){return r.draggable.register(u.current),function(){return r.draggable.unregister(u.current)}},[r.draggable]),Dt(function(){if(h.current){h.current=!1;return}var S=u.current;u.current=f,r.draggable.update(f,S)},[f,r.draggable])}function nE(e,t,n){to(function(){function r(s){return"Draggable[id: "+s+"]: "}var a=e.draggableId;a||(process.env.NODE_ENV!=="production"?K(!1,"Draggable requires a draggableId"):K(!1)),typeof a!="string"&&(process.env.NODE_ENV!=="production"?K(!1,`Draggable requires a [string] draggableId.
|
|
522
|
+
Provided: [type: `+typeof a+"] (value: "+a+")"):K(!1)),ob(e.index)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" requires an integer index prop"):K(!1)),e.mapped.type!=="DRAGGING"&&(Op(n()),e.isEnabled&&(up(t,a)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" Unable to find drag handle"):K(!1))))})}function rE(e){js(function(){var t=x.useRef(e);to(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Draggable isClone prop value changed during component life"):K(!1))},[e])})}function oE(e){e.preventDefault()}function aE(e){var t=x.useRef(null),n=ge(function(P){t.current=P},[]),r=ge(function(){return t.current},[]),a=Yo(Ko),s=a.contextId,l=a.dragHandleUsageInstructionsId,c=a.registry,p=Yo(ti),m=p.type,f=p.droppableId,u=Me(function(){return{id:e.draggableId,index:e.index,type:m,droppableId:f}},[e.draggableId,e.index,m,f]),h=e.children,S=e.draggableId,y=e.isEnabled,T=e.shouldRespectForcePress,C=e.canDragInteractiveElements,E=e.isClone,N=e.mapped,M=e.dropAnimationFinished;if(nE(e,s,r),rE(E),!E){var I=Me(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:C,shouldRespectForcePress:T,isEnabled:y}},[u,c,r,C,T,y]);tE(I)}var k=Me(function(){return y?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":S,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:oE}:null},[s,l,S,y]),V=ge(function(P){N.type==="DRAGGING"&&N.dropping&&P.propertyName==="transform"&&M()},[M,N]),R=Me(function(){var P=QT(N),O=N.type==="DRAGGING"&&N.dropping?V:null,$={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":S,style:P,onTransitionEnd:O},dragHandleProps:k};return $},[s,k,S,N,V,n]),w=Me(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return h(R,N.snapshot,w)}var Rp=function(e,t){return e===t},Bp=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},sE=function(t){return t.combine?t.combine.draggableId:null},iE=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function lE(){var e=nt(function(a,s){return{x:a,y:s}}),t=nt(function(a,s,l,c,p){return{isDragging:!0,isClone:s,isDropAnimating:!!p,dropAnimation:p,mode:a,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=nt(function(a,s,l,c,p,m,f){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:m,mode:s,offset:a,dimension:l,forceShouldAnimate:f,snapshot:t(s,c,p,m,null)}}}),r=function(s,l){if(s.isDragging){if(s.critical.draggable.id!==l.draggableId)return null;var c=s.current.client.offset,p=s.dimensions.draggables[l.draggableId],m=Ct(s.impact),f=iE(s.impact),u=s.forceShouldAnimate;return n(e(c.x,c.y),s.movementMode,p,l.isClone,m,f,u)}if(s.phase==="DROP_ANIMATING"){var h=s.completed;if(h.result.draggableId!==l.draggableId)return null;var S=l.isClone,y=s.dimensions.draggables[l.draggableId],T=h.result,C=T.mode,E=Bp(T),N=sE(T),M=s.dropDuration,I={duration:M,curve:Os.drop,moveTo:s.newHomeClientOffset,opacity:N?qr.opacity.drop:null,scale:N?qr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:s.newHomeClientOffset,dimension:y,dropping:I,draggingOver:E,combineWith:N,mode:C,forceShouldAnimate:null,snapshot:t(C,S,E,N,I)}}}return null};return r}function Ap(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var cE={mapped:{type:"SECONDARY",offset:rt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ap(null)}};function dE(){var e=nt(function(l,c){return{x:l,y:c}}),t=nt(Ap),n=nt(function(l,c,p){return c===void 0&&(c=null),{mapped:{type:"SECONDARY",offset:l,combineTargetFor:c,shouldAnimateDisplacement:p,snapshot:t(c)}}}),r=function(c){return c?n(rt,c,!0):null},a=function(c,p,m,f){var u=m.displaced.visible[c],h=!!(f.inVirtualList&&f.effected[c]),S=Bo(m),y=S&&S.draggableId===c?p:null;if(!u){if(!h)return r(y);if(m.displaced.invisible[c])return null;var T=ur(f.displacedBy.point),C=e(T.x,T.y);return n(C,y,!0)}if(h)return r(y);var E=m.displacedBy.point,N=e(E.x,E.y);return n(N,y,u.shouldAnimate)},s=function(c,p){if(c.isDragging)return c.critical.draggable.id===p.draggableId?null:a(p.draggableId,c.critical.draggable.id,c.impact,c.afterCritical);if(c.phase==="DROP_ANIMATING"){var m=c.completed;return m.result.draggableId===p.draggableId?null:a(p.draggableId,m.result.draggableId,m.impact,m.afterCritical)}return null};return s}var pE=function(){var t=lE(),n=dE(),r=function(s,l){return t(s,l)||n(s,l)||cE};return r},uE={dropAnimationFinished:Yd},mE=td(pE,uE,null,{context:Ys,pure:!0,areStatePropsEqual:Rp})(aE);function Fp(e){var t=Yo(ti),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:x.createElement(mE,e)}function Vp(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return x.createElement(Fp,ye({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function fE(e){var t=x.useContext(Ko);t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find app context"):K());var n=t.contextId,r=t.isMovementAllowed,a=x.useRef(null),s=x.useRef(null),l=e.children,c=e.droppableId,p=e.type,m=e.mode,f=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,S=e.isCombineEnabled,y=e.snapshot,T=e.useClone,C=e.updateViewportMaxScroll,E=e.getContainerForClone,N=ge(function(){return a.current},[]),M=ge(function(J){a.current=J},[]),I=ge(function(){return s.current},[]),k=ge(function(J){s.current=J},[]);UT({props:e,getDroppableRef:N,getPlaceholderRef:I});var V=ge(function(){r()&&C({maxScroll:Xd()})},[r,C]);FT({droppableId:c,type:p,mode:m,direction:f,isDropDisabled:h,isCombineEnabled:S,ignoreContainerClipping:u,getDroppableRef:N});var R=x.createElement(zT,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(J){var L=J.onClose,Z=J.data,A=J.animate;return x.createElement(HT,{placeholder:Z,onClose:L,innerRef:k,animate:A,contextId:n,onTransitionEnd:V})}),w=Me(function(){return{innerRef:M,placeholder:R,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,R,M]),P=T?T.dragging.draggableId:null,O=Me(function(){return{droppableId:c,type:p,isUsingCloneFor:P}},[c,P,p]);function $(){if(!T)return null;var J=T.dragging,L=T.render,Z=x.createElement(Fp,{draggableId:J.draggableId,index:J.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(A,ne){return L(A,ne,J)});return vo.createPortal(Z,E())}return x.createElement(ti.Provider,{value:O},l(w,y),$())}var oi=function(t,n){return t===n.droppable.type},$p=function(t,n){return n.draggables[t.draggable.id]},hE=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ye({},t,{shouldAnimatePlaceholder:!1}),r=nt(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),a=nt(function(l,c,p,m,f,u){var h=f.descriptor.id,S=f.descriptor.droppableId===l;if(S){var y=u?{render:u,dragging:r(f.descriptor)}:null,T={isDraggingOver:p,draggingOverWith:p?h:null,draggingFromThisWith:h,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!1,snapshot:T,useClone:y}}if(!c)return n;if(!m)return t;var C={isDraggingOver:p,draggingOverWith:h,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!0,snapshot:C,useClone:null}}),s=function(c,p){var m=p.droppableId,f=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var S=c.critical;if(!oi(f,S))return n;var y=$p(S,c.dimensions),T=Ct(c.impact)===m;return a(m,u,T,T,y,h)}if(c.phase==="DROP_ANIMATING"){var C=c.completed;if(!oi(f,C.critical))return n;var E=$p(C.critical,c.dimensions);return a(m,u,Bp(C.result)===m,Ct(C.impact)===m,E,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var N=c.completed;if(!oi(f,N.critical))return n;var M=Ct(N.impact)===m,I=!!(N.impact.at&&N.impact.at.type==="COMBINE"),k=N.critical.droppable.id===m;return M?I?t:n:k?t:n}return n};return s},SE={updateViewportMaxScroll:mv};function gE(){return document.body||(process.env.NODE_ENV!=="production"?K(!1,"document.body is not ready"):K()),document.body}var bE={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:gE},ai=td(hE,SE,null,{context:Ys,pure:!0,areStatePropsEqual:Rp})(fE);ai.defaultProps=bE;const vE={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function Ue(e){const{children:t,className:n,href:r,icon:a,kind:s=W.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=W.ButtonType.BUTTON,unsafelyReplaceClassName:m,...f}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=o.useContext(He),S=G(m||"sps-button",`sps-button--${s}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),y=a&&o.createElement("i",{className:G("sps-icon",`sps-icon-${a}`),"aria-hidden":"true"}),T=l&&o.createElement("div",{className:"sps-spinner"},c||h("design-system:button.spinningTitle"));return o.createElement("div",{className:S},r?o.createElement("a",{...f,href:r,className:"sps-button__clickable-element"},y,t,T):o.createElement("button",{...f,type:p,className:"sps-button__clickable-element",disabled:u},y,t,T))}Object.assign(Ue,{props:vE,displayName:"SpsButton"});const yE={content:"ReactNodeLike",icon:"SpsIcon",title:"string"};function Kp(e){const{content:t,className:n,icon:r,title:a,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=G(l||"sps-card__header",n);return o.createElement("div",{className:p,title:a,...c},o.createElement("div",{className:"sps-card__title"}," ",r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`})," ",a),o.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(Kp,{props:yE,displayName:"SpsCardHeader"});const TE={icon:"SpsIcon",kind:"TagKind"};function Ft(e){const{children:t,className:n,icon:r,kind:a=W.TagKind.DEFAULT,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=o.Children.toArray(t).filter(f=>typeof f=="string").join(""),m=G(l||"sps-tag",`sps-tag--${a}`,n);return o.createElement("span",{className:m,"data-testid":`${s}__tag`,title:p,...c},r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`,"data-testid":`${s}__icon`}),t)}Object.assign(Ft,{props:TE,displayName:"SpsTag"});const EE={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function si(e){const{activateTab:t,active:n,children:r,className:a,label:s,icon:l,id:c,index:p=0,tag:m,tagKind:f,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:S,...y}=e,T=()=>{t&&t(this,p,r)},C=N=>{(N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),N.stopPropagation(),t&&t(this,p,r))},E=G(S||"sps-nav__item","sps-nav__link",n&&"active",a);return o.createElement("a",{className:E,onClick:T,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...y,tabIndex:0,onKeyDown:C},l&&o.createElement("i",{className:`sps-icon sps-icon-${l}`}),o.createElement("span",null,s),m&&o.createElement(Ft,{kind:f||W.TagKind.KEY,icon:u},m))}Object.assign(si,{props:EE,displayName:"SpsCardTabbedPane"});function wE(e,t,n){const[r,a]=o.useState({index:0,content:null}),s=o.useCallback((l,c,p)=>{a({index:c,content:p})},[]);return o.useEffect(()=>{function l(m){for(const f of m){const u=f.props;a({...r,content:u.children});break}}function c(m,f){for(let u=0;u<=m.length;u+=1){const h=m[u];if(h&&h.props&&(h.props.id&&h.props.id===f||h.props.label&&h.props.label===f)){a({content:h.props.children,index:u});break}}}const p=o.Children.toArray(e);n&&t?c(p,t):n&&l(p)},[t,e]),[r,s]}const CE={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function ii(e){o.useEffect(()=>{console.log(["App developers: There's a new card component! Update for improved performance,","fewer bugs, and increased flexibility. Reach out to the design system help Slack","channel if you have any questions!"].join(" "))},[]);const{activeTab:t,children:n,className:r,footer:a,headerContent:s,headerIcon:l,headerTitle:c,"data-testid":p,unsafelyReplaceClassName:m,...f}=e,u=o.Children.toArray(n).some(T=>o.isValidElement(T)&&T.type===si),[h,S]=wE(n,t,u),y=G(m||"sps-card",r);return o.createElement("div",{...f,className:y,"data-testid":`${p}__card`},(c||s)&&o.createElement(Kp,{title:c,content:vt(s),icon:l,"data-testid":`${p}__header`}),u===!0?o.createElement(o.Fragment,null,o.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},o.Children.map(n,(T,C)=>{if(o.isValidElement(T))return o.cloneElement(T,{active:C===h.index,index:C,activateTab:S,"data-testid":`${p}__tab`})})),o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},h.content)):o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),a&&o.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},vt(a)))}Object.assign(ii,{props:CE,displayName:"SpsCard"});function li(e,t){const[n,...r]=v.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function DE(e=[],t={}){return{validators:[],...t,_type:"Array",members:[...e],errors:null,invalid:!1,isValid(){const n=this;return!n.invalid&&n.members.every(r=>r.isValid())},isRequired(){const n=this;return n.validators&&n.validators.indexOf(Eo.required)>-1},hasError(n){const r=this;return r.errors&&Object.prototype.hasOwnProperty.call(r.errors,n)},length:e.length,setInitValue(n){for(const[r,a]of this.members.entries())a.setInitValue(n[r]);return this},getValue(){return this.members.map(n=>n.getValue())},setValue(n=[]){for(const[r,a]of this.members.entries())a.setValue(n[r]);return this},update(){return this},isFocused(){return this.members.some(n=>n.isFocused())},focus(){const n=this;return n.members.length&&n.members[0].focus(),this},blur(){for(const n of this.members)n.blur();return this},isPristine(){return this.members.every(n=>n.isPristine())},markAsPristine(){for(const n of this.members)n.markAsPristine();return this},markAsDirty(){for(const n of this.members)n.markAsDirty();return this},reset(n){const r=this;r.members=[...e],r.length=e.length;for(const[a,s]of r.members.entries())n&&a<n.length?s.reset(n[a]):s.reset();return r.update(),this},get(n){return li(this,n)},at(n){return this.members[n]},push(n){const r=this;return r.members.push(n),r.length=r.members.length,r.update(),this},insert(n,r){const a=this;return a.members.splice(n,0,r),a.length=a.members.length,a.update(),this},removeAt(n){const r=this;return r.members.splice(n,1),r.length=r.members.length,r.update(),this},setControl(n,r){const a=this;return a.members[n]=r,a.update(),this}}}function NE(e,t={}){return{validators:[],id:ft(),...t,_type:"Control",initValue:e,setInitValue(n){return this.value=n,this.initValue=n,this},value:e,getValue(){return this.value},setValue(n){return this.value=n,this.update(),this},errors:null,invalid:!1,isValid(){return!this.invalid},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},focused:!1,isFocused(){return this.focused},pristine:!0,isPristine(){return this.pristine},isRequired(){return this.validators&&this.validators.indexOf(Eo.required)>-1},update(){return this},focus(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this},blur(){return this.focused=!1,this.update(),this.onBlur&&this.onBlur(),this},markAsPristine(){return this.pristine=!0,this.update(),this},markAsDirty(){return this.pristine=!1,this.update(),this},reset(n=this.initValue){return this.value=n,this.pristine=!0,this.update(),this}}}function kE(e={},t={}){return{validators:[],...t,_type:"Group",members:{...e},errors:null,invalid:!1,isValid(){return!this.invalid&&Object.keys(this.members).every(n=>this.members[n].isValid())},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},setInitValue(n={}){for(const r of Object.keys(this.members))this.members[r].setInitValue(n[r]);return this},getValue(){return Object.keys(this.members).reduce((n,r)=>Object.assign(n,{[r]:this.members[r].getValue()}),{})},setValue(n={}){for(const r of Object.keys(this.members))this.members[r].setValue(n[r]);return this},update(){return this},isFocused(){return Object.keys(this.members).some(n=>this.members[n].isFocused())},focus(){const n=Object.keys(this.members);return n.length&&this.members[n[0]].focus(),this},blur(){for(const n of Object.keys(this.members))this.members[n].blur();return this},isPristine(){return Object.keys(this.members).every(n=>this.members[n].isPristine())},markAsPristine(){for(const n of Object.keys(this.members))this.members[n].markAsPristine();return this},markAsDirty(){for(const n of Object.keys(this.members))this.members[n].markAsDirty();return this},reset(n){this.members={...e};for(const r of Object.keys(this.members))n&&Object.prototype.hasOwnProperty.call(n,r)?this.members[r].reset(n[r]):this.members[r].reset();return this.update(),this},get(n){return li(this,n)},addControl(n,r){if(this.contains(n))throw new Error(`Form group already contains a control called "${n}".`);return this.members[n]=r,this.update(),this},removeControl(n){return delete this.members[n],this.update(),this},setControl(n,r){return this.members[n]=r,this.update(),this},contains(n){return Object.keys(this.members).indexOf(n)>-1}}}function IE(e,t){t&&e.setInitValue(t);const[n,r]=x.useState(),[a,s]=x.useState([]),[l,c]=x.useReducer(p=>{for(const m of a)for(const f of v.traversePath(p,m))f.validators&&f.validators.length&&(f.errors=wo(f.getValue(),f.validators),f.invalid=!!f.errors&&!f.pristine);return r(void 0),s([]),{...p}},e);return v.forEachNestedObject(l,(p,m)=>{m._type&&(m.update=function(){return a.push(p),s(a),n||r(window.setTimeout(c,0)),this})}),l}function xE(e,t=null){const[n,r]=x.useState(t),a=x.useRef(()=>null);return x.useEffect(()=>{const s=()=>n;if(e.validators){const l=e.validators.indexOf(a.current);l===-1?e.validators.push(s):e.validators[l]=s,e.update(),a.current=s}},[n]),[n,r]}const Hp={formMeta:"SpsFormSetMeta<any>",onSubmit:"React.FormEventHandler"},ro=o.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:a,formGroup:s,formMeta:l,...c}=e,p=s||a;function m(f){f.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(f)}return o.createElement("form",{ref:t,onSubmit:m,...c},n)});Object.assign(ro,{props:Hp,displayName:"SpsForm"});const Wp={},ME={ideal:{label:"Ideal",examples:{ideal:{react:v.code`
|
|
523
523
|
import {
|
|
524
524
|
SpsForm,
|
|
525
525
|
SpsLabel,
|
|
@@ -1158,7 +1158,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
1158
1158
|
</>
|
|
1159
1159
|
)
|
|
1160
1160
|
}
|
|
1161
|
-
`}}}},AE=ar.default||ar;function FE(){return new Array(7).fill(null)}function Up(e){const t=AE({year:e.year,month:e.month-1,date:1}),n=t.weekday(),r=t.daysInMonth(),a=Math.ceil((r+n)/7),s=a*7,l=new Array(a).fill(!0).map(FE);t.subtract(n,"days");for(let c=0;c<s;c+=1){const p=l[Math.floor(c/7)],m=c%7;p[m]=Object.freeze({year:t.year(),month:t.month()+1,date:t.date()}),m===6&&Object.freeze(p),t.add(1,"day")}return l}function zp(e){const[t,n]=o.useState(()=>Up(e));return o.useEffect(()=>{n(Up(e))},[e]),t}function jp(e){const[t,n]=o.useState(()=>te.toMoment(e));return o.useEffect(()=>n(te.toMoment(e)),[e]),t}const qp=ar.default||ar,St="sps-datepicker__calendar";function
|
|
1161
|
+
`}}}},AE=ar.default||ar;function FE(){return new Array(7).fill(null)}function Up(e){const t=AE({year:e.year,month:e.month-1,date:1}),n=t.weekday(),r=t.daysInMonth(),a=Math.ceil((r+n)/7),s=a*7,l=new Array(a).fill(!0).map(FE);t.subtract(n,"days");for(let c=0;c<s;c+=1){const p=l[Math.floor(c/7)],m=c%7;p[m]=Object.freeze({year:t.year(),month:t.month()+1,date:t.date()}),m===6&&Object.freeze(p),t.add(1,"day")}return l}function zp(e){const[t,n]=o.useState(()=>Up(e));return o.useEffect(()=>{n(Up(e))},[e]),t}function jp(e){const[t,n]=o.useState(()=>te.toMoment(e));return o.useEffect(()=>n(te.toMoment(e)),[e]),t}const qp=ar.default||ar,St="sps-datepicker__calendar";function oo({maxDate:e,selectedDate:t,selectedRange:n}){const r=n?te.nullifyInvalidDate(n[0])||te.nullifyInvalidDate(n[1]):null;return te.nullifyInvalidDate(t)||r||te.nullifyInvalidDate(e)||te.create()}function qo(e){const{children:t,className:n,isOpen:r,maxDate:a,minDate:s,onNewSelection:l,selectedDate:c,selectedRange:p,selectedPreset:m,showTwoMonths:f=!1,"data-testid":u,...h}=e,{t:S}=o.useContext(He),[y,T]=o.useState(()=>oo(e)),[C,E]=o.useState(te.nextMonth({...y,date:15})),N=o.useMemo(()=>te.create(),[]);o.useEffect(()=>{if(p&&p[0]&&p[1]&&p[0].month!==y.month&&p[0].month!==C.month&&p[1].month!==y.month&&p[1].month!==C.month){const A=oo(e);T(A),E(te.nextMonth({month:A.month,date:15,year:A.year}))}else if(p&&p[0]&&!p[1]&&p[0].month!==y.month&&p[0].month!==C.month){const A=oo(e);T(A),E(te.nextMonth({month:A.month,date:15,year:A.year}))}else if(p&&!p[0]&&p[1]&&p[1].month!==y.month&&p[1].month!==C.month){const A=oo(e);T(A),E(te.nextMonth({month:A.month,date:15,year:A.year}))}else{const A=oo(e);T(A),E(te.nextMonth({month:A.month,date:15,year:A.year}))}},[c,p,a,r]);const M=jp(y),I=zp(y),k=jp(C),V=zp(C),[R,w]=o.useState();function P(){T(te.prevMonth({...y,date:15})),f&&E(te.prevMonth({...C,date:15}))}function O(){T(te.nextMonth({...y,date:15})),f&&E(te.nextMonth({...C,date:15}))}function $(A){A.target&&A.target.classList.contains(`${St}-day`)?f&&A.target.classList.contains(`${C.month}`)?w({...C,date:Number(A.target.textContent)}):w({...y,date:Number(A.target.textContent)}):(!A.target||!A.target.classList.contains(`${St}-row`))&&w(void 0)}function J(A,ne=!1){const Y=`${St}-day`;return G(`${St}-cell`,A&&y&&A.month===y.month&&!ne&&Y,f&&A.month===C.month&&ne&&Y,te.isSameDate(N,A)&&`${Y}--current-day`,(te.isSameDate(A,c)&&te.isInRange(A,[s,a])!==!1||p&&te.isSameDate(A,p[0])||te.isInRange(A,p))&&`${Y}--selected`,te.isInRange(A,[s,a])===!1&&`${Y}--disabled`,p&&p[1]&&te.isSameDate(A,p[0])&&!te.isSameDate(A,p[1])&&`${Y}--selection-start`,te.isInRange(A,p,!1)&&`${Y}--selection-middle`,p&&te.isSameDate(A,p[1])&&!te.isSameDate(A,p[0])&&`${Y}--selection-end`,p&&p[0]&&!p[1]&&(!s&&!a||te.isInRange(R,[s,a]))&&te.isInRange(A,[p[0],R],!1)&&`${Y}--pending-selection`,m&&m==="After"&&p&&p[0]&&p[1]===null&&(!s&&!a||te.isInRange(A,[p[0],a]))&&te.isInRange(A,[p[0],{month:12,date:31,year:3e3}],!1)&&`${Y}--selected`,m&&m==="Before"&&p&&p[0]===null&&p[1]&&(!s&&!a||te.isInRange(A,[s,p[1]]))&&te.isInRange(A,[{month:1,date:1,year:1900},p[1]])&&`${Y}--selected`)}function L(A){A&&y&&A.month===y.month&&te.isInRange(A,[s,a])!==!1&&l(A),A&&f&&C&&A.month===C.month&&te.isInRange(A,[s,a])!==!1&&l(A)}const Z=G(St,n);return y?o.createElement(o.Fragment,null,o.createElement("div",{"data-testid":`${u}`,className:Z,...h,onMouseOver:$},o.createElement("div",{className:`${St}-head`},o.createElement("button",{"data-testid":`${u}_prev_month`,type:"button",tabIndex:-1,disabled:te.isSameMonth(y,s),title:S("design-system:datepicker.calendar.prevMonth",{defaultValue:"View Previous Month"}),className:"sps-datepicker__button sps-datepicker__button-previous-month",onClick:P},o.createElement("i",{className:"sps-icon sps-icon-chevron-left"})),o.createElement("span",{className:`${St}-head-label`},o.createElement("span",{className:`${St}-head-label-month`},M?M.format("MMMM"):""),o.createElement("span",{className:`${St}-head-label-year`},y.year)),!f&&o.createElement("button",{type:"button","data-testid":`${u}_next_month`,tabIndex:-1,disabled:te.isSameMonth(y,a),title:S("design-system:datepicker.calendar.nextMonth",{defaultValue:"View Next Month"}),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:O},o.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),o.createElement("div",{className:`${St}-body`},o.createElement("div",{className:"sps-datepicker__calendar-row"},qp.weekdaysShort().map(A=>o.createElement("div",{key:A,className:"sps-datepicker__calendar-header-cell"},A))),I.map((A,ne)=>o.createElement("div",{key:ne,className:"sps-datepicker__calendar-row"},A.map((Y,U)=>o.createElement("div",{key:U,className:J(Y),onClick:()=>L(Y),"data-testid":`${u}_${te.toString(Y)}`},Y?Y.date:"")))))),f&&o.createElement("div",{"data-testid":`${u}`,className:Z,...h,onMouseOver:$},o.createElement("div",{className:`${St}-head`},o.createElement("span",{className:`${St}-head-label`},o.createElement("span",{className:`${St}-head-label-month`},k?k.format("MMMM"):""),o.createElement("span",{className:`${St}-head-label-year`},C.year)),o.createElement("button",{type:"button","data-testid":`${u}_next_month`,tabIndex:-1,disabled:te.isSameMonth(C,a),title:S("design-system:datepicker.calendar.nextMonth",{defaultValue:"View Next Month"}),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:O},o.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),o.createElement("div",{className:`${St}-body`},o.createElement("div",{className:"sps-datepicker__calendar-row"},qp.weekdaysShort().map(A=>o.createElement("div",{key:A,className:"sps-datepicker__calendar-header-cell"},A))),V.map((A,ne)=>o.createElement("div",{key:ne,className:"sps-datepicker__calendar-row"},A.map((Y,U)=>o.createElement("div",{key:U,className:G(J(Y,!0),`${C.month.toString()}`),onClick:()=>L(Y),"data-testid":`${u}_${te.toString(Y)}`},Y?Y.date:""))))))):o.createElement(o.Fragment,null)}Object.assign(qo,{displayName:"SpsDatepickerCalendar"});const Jp="sps-datepicker__popup",Jo=o.forwardRef(({attachTo:e,children:t,className:n,isOpen:r,...a},s)=>{const l=s||o.useRef(null),c=cr("sps-datepicker-popup-portal"),p=o.useContext(kt),[m]=r?An(l,e,W.Position.BOTTOM_LEFT,{altPosition:Wa(W.Position.BOTTOM_LEFT),...p}):[{}],f=G(Jp,"z-stratum-dropdown",r&&`${Jp}--open`,n);return c(o.createElement("div",{...a,className:f,ref:l,style:m},t))});Object.assign(Jo,{displayName:"SpsDatepickerPopup"});const VE={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDate>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newDate: SimpleDate) => void",value:"SimpleDate",format:"string",showTwoMonths:"boolean"},Zp="sps-datepicker";function pi({children:e,className:t,disabled:n,formMeta:r,id:a,maxDate:s,minDate:l,onChange:c,value:p,format:m,showTwoMonths:f,"data-testid":u,...h}){const{wrapperId:S,controlId:y}=bt(a,r),T=o.useRef(null),C=o.useRef(null),E=o.useRef(null),[N,M]=o.useState(te.toString(p,m)),{showPopup:I,doShowPopup:k,doHidePopup:V}=dr(T,C);function R(Z){r&&(r.setValue(Z),r.markAsDirty()),c&&c(Z)}function w(Z){R(Z),M(te.toString(Z,m)),E&&E.current&&E.current.focus()}function P(Z){M(Z.target.value);const A=te.createFrom(Z.target.value,m);R(A)}function O(){V(),M(""),R()}function $(Z){switch(Z.key){case"Tab":V();break;case"Backspace":Z.target.selectionStart===0&&p&&!Array.isArray(p)&&O();break}}const J=G(Zp,"sps-text-input",I&&`${Zp}--open`,t),L=o.useRef(!1);return o.useEffect(()=>{L.current?p?te.isValid(p)&&M(te.toString(p,m)):O():L.current=!0},[p,m]),o.createElement(o.Fragment,null,o.createElement(at,{id:S,className:J,formMeta:r,inputRef:E,focusInputOnClick:!0,ref:T},o.createElement("div",{className:G("sps-form-control",n&&"disabled")},o.createElement("i",{className:G("sps-text-input__icon","sps-icon","sps-icon-calendar-blank")}),o.createElement("input",{type:"text",ref:E,className:"sps-text-input__input",id:y,placeholder:(m==null?void 0:m.toUpperCase())||ir,onChange:P,onClick:k,onFocus:k,onKeyDown:$,value:N,disabled:n,"data-testid":`${u}_date_input`,...h}),p&&!n&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:O}))),o.createElement(Jo,{isOpen:I,attachTo:T,ref:C},o.createElement(qo,{"data-testid":`${u}_calendar`,selectedDate:p,onNewSelection:w,minDate:l,maxDate:s,showTwoMonths:f})))}Object.assign(pi,{props:VE,displayName:"SpsDatepicker"});const Xp={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1162
1162
|
import {
|
|
1163
1163
|
useSpsForm,
|
|
1164
1164
|
SpsLabel,
|
|
@@ -1510,7 +1510,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
1510
1510
|
</div>
|
|
1511
1511
|
);
|
|
1512
1512
|
}
|
|
1513
|
-
`}}}},HE=
|
|
1513
|
+
`}}}},HE=ko||Ka,WE={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>"},Yn=o.forwardRef((e,t)=>{const{action:n,autoFixWidth:r=!1,captionKey:a,className:s,comparisonKey:l,disabled:c,formControl:p,formMeta:m,id:f,notClearable:u,options:h,onChange:S,onClick:y,onOpen:T,placeholder:C,searchDebounce:E,searchPlaceholder:N="Search…",tallOptionList:M,textKey:I,valueKey:k,unsafelyReplaceClassName:V,value:R,zeroState:w,loading:P,filterByTextAndCaptionKey:O,maxHeightOptionListPx:$,maxHeightOptionListRem:J,"data-testid":L,disableOptionsMemoization:Z,disableDefaultOptionsFiltering:A,onBeforeChange:ne,...Y}=e,U=m||p,{wrapperId:ae,controlId:H}=bt(f,U),q=o.useRef(null),re=o.useRef(null),oe=o.useRef(null),{t:j}=o.useContext(He),[B,z]=qt({isOpen:!1,value:R,text:"",keyDown:null,opensUpward:!1,optionIds:""}),[Q,ee]=o.useState();function de(fe){z({value:fe,text:fe&&I?fe[I]:fe})}async function ie(fe){const Fe=fe&&k&&typeof fe=="object"?fe[k]:fe;ne&&!await ne(Fe)||(de(fe),U&&(U.setValue(Fe),U.markAsDirty()),S&&S(new gn({value:Fe})))}o.useEffect(()=>{de(R)},[R,I]);function le(){ie(void 0)}function se(){z({isOpen:!1})}function Ne(fe){fe.nativeEvent.stopImmediatePropagation(),c||z({isOpen:!B.isOpen})}function ke(fe){c||(["Up","ArrowUp","Down","ArrowDown"," ","Spacebar"].indexOf(fe.key)>-1&&fe.preventDefault(),Ga.includes(fe.key)&&(ee(fe),fe.preventDefault()),fe.persist(),z({keyDown:fe}))}function it(fe){z({isOpen:fe})}function lt(fe){z({opensUpward:fe})}function ut(fe){fe.detail!==ae&&z({isOpen:!1})}function ct(fe){z({optionIds:new Array(fe).fill("").map((Fe,ve)=>`${ae}-options-option-${ve}`).join(",")})}o.useEffect(()=>(document.addEventListener("click",se),document.addEventListener("DropdownOpened",ut),()=>{document.removeEventListener("click",se),document.removeEventListener("DropdownOpened",ut)}),[]),o.useLayoutEffect(()=>{if(r&&oe.current&&q.current){q.current.style.width="";const Fe=`${q.current.getBoundingClientRect().width+6}px`;q.current.style.width=Fe,oe.current.style.width=Fe,oe.current.style.maxWidth=Fe}}),Ya(()=>{if(B.isOpen){re.current&&HE(re.current,{scrollMode:"if-needed"}),T==null||T();const fe=document.createEvent("CustomEvent");fe.initCustomEvent("DropdownOpened",!1,!1,ae),document.dispatchEvent(fe)}},[B.isOpen]),o.useImperativeHandle(t,()=>({focus:()=>{var fe;(fe=re.current)==null||fe.focus()}})),o.useEffect(()=>{let fe;return B.isOpen&&(fe=()=>{z({isOpen:!1})},window.addEventListener("resize",fe)),()=>{fe&&window.removeEventListener("resize",fe)}},[B.isOpen]),Br({isOpen:B.isOpen,rootRef:re});const Pt=G(V||"sps-select",B.isOpen&&"sps-select--open",B.isOpen&&"z-stratum-dropdown",B.opensUpward&&"sps-select--opens-upward",s),je=B.text||C||j("design-system:select.defaultPlaceholder",{defaultValue:"Select one..."});return o.createElement(at,{id:ae,className:Pt,onKeyDown:ke,formControl:p,formMeta:m,ref:re,role:"listbox","aria-owns":B.optionIds,"data-testid":L,onClick:y,...Y},o.createElement("div",{className:G("sps-select__dropctrl",c&&"disabled"),id:H,tabIndex:0,onClick:Ne,ref:oe,title:je,"data-testid":`${L}-dropctrl`},o.createElement("div",{className:"sps-select__dropctrl-content"},o.createElement("span",{className:G("sps-select__value",!B.text&&"sps-select__value--placeholder"),"data-testid":`${L}-value`},je),B.value&&!u&&!c&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-select__clear-btn",onClick:le,"data-testid":`${L}-clear-value`}),o.createElement("i",{className:"sps-icon sps-icon-chevron-down sps-select__dropctrl-icon"}))),o.createElement(Rr,{id:`${ae}-options`,ref:q,attachTo:oe,captionKey:a,comparisonKey:l,isOpen:B.isOpen,keyDown:B.keyDown,options:h,onOptionSelected:ie,onPositionFlip:lt,onSelfToggle:it,searchDebounce:E,searchPlaceholder:N,selectedOption:B.value,specialAction:n,tall:M,textKey:I,filterByTextAndCaptionKey:O,optionRole:"option",valueKey:k,onOptionListChanged:ct,zeroState:w,ignoreWidthStyles:r,loading:P,maxHeightPx:$,maxHeightRem:J,disableOptionsMemoization:Z,disableDefaultOptionsFiltering:A,"data-testid":`${L}-option-list`,typeaheadEvent:Q}))});Object.assign(Yn,{props:WE,displayName:"SpsSelect"});const nu={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 Selects",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"];
|
|
@@ -1974,7 +1974,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=le(Q,ie,j,B,z+"."
|
|
|
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 hi={exports:{}},iu;function tn(){return iu||(iu=1,function(e,t){(function(n,r){e.exports=r()})(Ut,function(){var n;function r(){return n.apply(null,arguments)}function a(i){n=i}function s(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 rh(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 C(i){return i._pf==null&&(i._pf=T()),i._pf}var E;Array.prototype.some?E=Array.prototype.some:E=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=C(i),g=E.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(C(d),i):C(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=C(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 R(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 w(i){return i instanceof R||i!=null&&i._isAMomentObject!=null}function P(i){r.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+i)}function O(i,d){var g=!0;return S(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,i),g){var b=[],D,F,X,he=arguments.length;for(F=0;F<he;F++){if(D="",typeof arguments[F]=="object"){D+=`
|
|
1975
1975
|
[`+F+"] ";for(X in arguments[0])c(arguments[0],X)&&(D+=X+": "+arguments[0][X]+", ");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 $={};function J(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),$[i]||(P(d),$[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function L(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function Z(i){var d,g;for(g in i)c(i,g)&&(d=i[g],L(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 ne(i){i!=null&&this.set(i)}var Y;Object.keys?Y=Object.keys:Y=function(i){var d,g=[];for(d in i)c(i,d)&&g.push(d);return g};var U={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ae(i,d,g){var b=this._calendar[i]||this._calendar.sameElse;return L(b)?b.call(d,g):b}function H(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 q=/(\[[^\[]*\])|(\\)?([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,oe={},j={};function B(i,d,g,b){var D=b;typeof b=="string"&&(D=function(){return this[b]()}),i&&(j[i]=D),d&&(j[d[0]]=function(){return H(D.apply(this,arguments),d[1],d[2])}),g&&(j[g]=function(){return this.localeData().ordinal(D.apply(this,arguments),i)})}function z(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Q(i){var d=i.match(q),g,b;for(g=0,b=d.length;g<b;g++)j[d[g]]?d[g]=j[d[g]]:d[g]=z(d[g]);return function(D){var F="",X;for(X=0;X<b;X++)F+=L(d[X])?d[X].call(D,i):d[X];return F}}function ee(i,d){return i.isValid()?(d=de(d,i.localeData()),oe[d]=oe[d]||Q(d),oe[d](i)):i.localeData().invalidDate()}function de(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 ie={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 le(i){var d=this._longDateFormat[i],g=this._longDateFormat[i.toUpperCase()];return d||!g?d:(this._longDateFormat[i]=g.match(q).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var se="Invalid date";function Ne(){return this._invalidDate}var ke="%d",it=/\d{1,2}/;function lt(i){return this._ordinal.replace("%d",i)}var ut={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 ct(i,d,g,b){var D=this._relativeTime[g];return L(D)?D(i,d,g,b):D.replace(/%d/i,i)}function Pt(i,d){var g=this._relativeTime[i>0?"future":"past"];return L(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 fe(i){return typeof i=="string"?je[i]||je[i.toLowerCase()]:void 0}function Fe(i){var d={},g,b;for(b in i)c(i,b)&&(g=fe(b),g&&(d[g]=i[b]));return d}var ve={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 Le(i){var d=[],g;for(g in i)c(i,g)&&d.push({unit:g,priority:ve[g]});return d.sort(function(b,D){return b.priority-D.priority}),d}var Qe=/\d/,we=/\d\d/,Ht=/\d{3}/,Mn=/\d{4}/,ue=/[+-]?\d{6}/,Se=/\d\d?/,Oe=/\d\d\d\d?/,Ze=/\d\d\d\d\d\d?/,Ie=/\d{1,3}/,dt=/\d{1,4}/,Tt=/[+-]?\d{1,6}/,Ae=/\d+/,pt=/[+-]?\d+/,_n=/Z|[+-]\d\d:?\d\d/gi,Xt=/Z|[+-]\d\d(?::?\d\d)?/gi,va=/[+-]?\d+(\.\d{1,3})?/,be=/[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,Te=/^[1-9]\d?/,Xe=/^([1-9]\d|\d)/,Rt;Rt={};function me(i,d,g){Rt[i]=L(d)?d:function(b,D){return b&&g?g:d}}function wl(i,d){return c(Rt,i)?Rt[i](d._strict,d._locale):new RegExp(bN(i))}function bN(i){return an(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,g,b,D,F){return g||b||D||F}))}function an(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Bt(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=Bt(d)),g}var Cl={};function Ke(i,d){var g,b=d,D;for(typeof i=="string"&&(i=[i]),f(d)&&(b=function(F,X){X[d]=Ce(F)}),D=i.length,g=0;g<D;g++)Cl[i[g]]=b}function co(i,d){Ke(i,function(g,b,D,F){D._w=D._w||{},d(g,D._w,D,F)})}function vN(i,d,g){d!=null&&c(Cl,i)&&Cl[i](d,g._a,g,i)}function ya(i){return i%4===0&&i%100!==0||i%400===0}var mt=0,sn=1,Qt=2,et=3,Wt=4,ln=5,er=6,yN=7,TN=8;B("Y",0,0,function(){var i=this.year();return i<=9999?H(i,4):"+"+i}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),me("Y",pt),me("YY",Se,we),me("YYYY",dt,Mn),me("YYYYY",Tt,ue),me("YYYYYY",Tt,ue),Ke(["YYYYY","YYYYYY"],mt),Ke("YYYY",function(i,d){d[mt]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),Ke("YY",function(i,d){d[mt]=r.parseTwoDigitYear(i)}),Ke("Y",function(i,d){d[mt]=parseInt(i,10)});function po(i){return ya(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var Kf=Dr("FullYear",!0);function EN(){return ya(this.year())}function Dr(i,d){return function(g){return g!=null?(Hf(this,i,g),r.updateOffset(this,d),this):uo(this,i)}}function uo(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 Hf(i,d,g){var b,D,F,X,he;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,X=i.month(),he=i.date(),he=he===29&&X===1&&!ya(F)?28:he,D?b.setUTCFullYear(F,X,he):b.setFullYear(F,X,he)}}function wN(i){return i=fe(i),L(this[i])?this[i]():this}function CN(i,d){if(typeof i=="object"){i=Fe(i);var g=Le(i),b,D=g.length;for(b=0;b<D;b++)this[g[b].unit](i[g[b].unit])}else if(i=fe(i),L(this[i]))return this[i](d);return this}function DN(i,d){return(i%d+d)%d}var qe;Array.prototype.indexOf?qe=Array.prototype.indexOf:qe=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Dl(i,d){if(isNaN(i)||isNaN(d))return NaN;var g=DN(d,12);return i+=(d-g)/12,g===1?ya(i)?29:28:31-g%7%2}B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),B("MMMM",0,0,function(i){return this.localeData().months(this,i)}),me("M",Se,Te),me("MM",Se,we),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[sn]=Ce(i)-1}),Ke(["MMM","MMMM"],function(i,d,g,b){var D=g._locale.monthsParse(i,b,g._strict);D!=null?d[sn]=D:C(g).invalidMonth=i});var NN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Wf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Gf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,kN=be,IN=be;function xN(i,d){return i?s(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Gf).test(d)?"format":"standalone"][i.month()]:s(this._months)?this._months:this._months.standalone}function MN(i,d){return i?s(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Gf.test(d)?"format":"standalone"][i.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _N(i,d,g){var b,D,F,X=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=qe.call(this._shortMonthsParse,X),D!==-1?D:null):(D=qe.call(this._longMonthsParse,X),D!==-1?D:null):d==="MMM"?(D=qe.call(this._shortMonthsParse,X),D!==-1?D:(D=qe.call(this._longMonthsParse,X),D!==-1?D:null)):(D=qe.call(this._longMonthsParse,X),D!==-1?D:(D=qe.call(this._shortMonthsParse,X),D!==-1?D:null))}function LN(i,d,g){var b,D,F;if(this._monthsParseExact)return _N.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 Yf(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,Dl(i.year(),g)),i._isUTC?i._d.setUTCMonth(g,b):i._d.setMonth(g,b),i}function Uf(i){return i!=null?(Yf(this,i),r.updateOffset(this,!0),this):uo(this,"Month")}function ON(){return Dl(this.year(),this.month())}function PN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||zf.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=kN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function RN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||zf.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=IN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function zf(){function i(Ee,De){return De.length-Ee.length}var d=[],g=[],b=[],D,F,X,he;for(D=0;D<12;D++)F=y([2e3,D]),X=an(this.monthsShort(F,"")),he=an(this.months(F,"")),d.push(X),g.push(he),b.push(he),b.push(X);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 BN(i,d,g,b,D,F,X){var he;return i<100&&i>=0?(he=new Date(i+400,d,g,b,D,F,X),isFinite(he.getFullYear())&&he.setFullYear(i)):he=new Date(i,d,g,b,D,F,X),he}function mo(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 Ta(i,d,g){var b=7+d-g,D=(7+mo(i,0,b).getUTCDay()-d)%7;return-D+b-1}function jf(i,d,g,b,D){var F=(7+g-b)%7,X=Ta(i,b,D),he=1+7*(d-1)+F+X,Ee,De;return he<=0?(Ee=i-1,De=po(Ee)+he):he>po(i)?(Ee=i+1,De=he-po(i)):(Ee=i,De=he),{year:Ee,dayOfYear:De}}function fo(i,d,g){var b=Ta(i.year(),d,g),D=Math.floor((i.dayOfYear()-b-1)/7)+1,F,X;return D<1?(X=i.year()-1,F=D+cn(X,d,g)):D>cn(i.year(),d,g)?(F=D-cn(i.year(),d,g),X=i.year()+1):(X=i.year(),F=D),{week:F,year:X}}function cn(i,d,g){var b=Ta(i,d,g),D=Ta(i+1,d,g);return(po(i)-b+D)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),me("w",Se,Te),me("ww",Se,we),me("W",Se,Te),me("WW",Se,we),co(["w","ww","W","WW"],function(i,d,g,b){d[b.substr(0,1)]=Ce(i)});function AN(i){return fo(i,this._week.dow,this._week.doy).week}var FN={dow:0,doy:6};function VN(){return this._week.dow}function $N(){return this._week.doy}function KN(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function HN(i){var d=fo(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}B("d",0,"do","day"),B("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),B("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),B("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),me("d",Se),me("e",Se),me("E",Se),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)}),co(["dd","ddd","dddd"],function(i,d,g,b){var D=g._locale.weekdaysParse(i,b,g._strict);D!=null?d.d=D:C(g).invalidWeekday=i}),co(["d","e","E"],function(i,d,g,b){d[b]=Ce(i)});function WN(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function GN(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Nl(i,d){return i.slice(d,7).concat(i.slice(0,d))}var YN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),qf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),UN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zN=be,jN=be,qN=be;function JN(i,d){var g=s(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Nl(g,this._week.dow):i?g[i.day()]:g}function ZN(i){return i===!0?Nl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function XN(i){return i===!0?Nl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function QN(i,d,g){var b,D,F,X=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=qe.call(this._weekdaysParse,X),D!==-1?D:null):d==="ddd"?(D=qe.call(this._shortWeekdaysParse,X),D!==-1?D:null):(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null):d==="dddd"?(D=qe.call(this._weekdaysParse,X),D!==-1||(D=qe.call(this._shortWeekdaysParse,X),D!==-1)?D:(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null)):d==="ddd"?(D=qe.call(this._shortWeekdaysParse,X),D!==-1||(D=qe.call(this._weekdaysParse,X),D!==-1)?D:(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null)):(D=qe.call(this._minWeekdaysParse,X),D!==-1||(D=qe.call(this._weekdaysParse,X),D!==-1)?D:(D=qe.call(this._shortWeekdaysParse,X),D!==-1?D:null))}function ek(i,d,g){var b,D,F;if(this._weekdaysParseExact)return QN.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 tk(i){if(!this.isValid())return i!=null?this:NaN;var d=uo(this,"Day");return i!=null?(i=WN(i,this.localeData()),this.add(i-d,"d")):d}function nk(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 rk(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=GN(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function ok(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=zN),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function ak(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jN),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function sk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qN),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function kl(){function i(gt,fn){return fn.length-gt.length}var d=[],g=[],b=[],D=[],F,X,he,Ee,De;for(F=0;F<7;F++)X=y([2e3,1]).day(F),he=an(this.weekdaysMin(X,"")),Ee=an(this.weekdaysShort(X,"")),De=an(this.weekdays(X,"")),d.push(he),g.push(Ee),b.push(De),D.push(he),D.push(Ee),D.push(De);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 Il(){return this.hours()%12||12}function ik(){return this.hours()||24}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Il),B("k",["kk",2],0,ik),B("hmm",0,0,function(){return""+Il.apply(this)+H(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Il.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+H(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)});function Jf(i,d){B(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}Jf("a",!0),Jf("A",!1);function Zf(i,d){return d._meridiemParse}me("a",Zf),me("A",Zf),me("H",Se,Xe),me("h",Se,Te),me("k",Se,Te),me("HH",Se,we),me("hh",Se,we),me("kk",Se,we),me("hmm",Oe),me("hmmss",Ze),me("Hmm",Oe),me("Hmmss",Ze),Ke(["H","HH"],et),Ke(["k","kk"],function(i,d,g){var b=Ce(i);d[et]=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[et]=Ce(i),C(g).bigHour=!0}),Ke("hmm",function(i,d,g){var b=i.length-2;d[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b)),C(g).bigHour=!0}),Ke("hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D)),C(g).bigHour=!0}),Ke("Hmm",function(i,d,g){var b=i.length-2;d[et]=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[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D))});function lk(i){return(i+"").toLowerCase().charAt(0)==="p"}var ck=/[ap]\.?m?\.?/i,dk=Dr("Hours",!0);function pk(i,d,g){return i>11?g?"pm":"PM":g?"am":"AM"}var Xf={calendar:U,longDateFormat:ie,invalidDate:se,ordinal:ke,dayOfMonthOrdinalParse:it,relativeTime:ut,months:NN,monthsShort:Wf,week:FN,weekdays:YN,weekdaysMin:UN,weekdaysShort:qf,meridiemParse:ck},ze={},ho={},So;function uk(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 Qf(i){return i&&i.toLowerCase().replace("_","-")}function mk(i){for(var d=0,g,b,D,F;d<i.length;){for(F=Qf(i[d]).split("-"),g=F.length,b=Qf(i[d+1]),b=b?b.split("-"):null;g>0;){if(D=Ea(F.slice(0,g).join("-")),D)return D;if(b&&b.length>=g&&uk(F,b)>=g-1)break;g--}d++}return So}function fk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Ea(i){var d=null,g;if(ze[i]===void 0&&e&&e.exports&&fk(i))try{d=So._abbr,g=Zt,g("./locale/"+i),Ln(d)}catch{ze[i]=null}return ze[i]}function Ln(i,d){var g;return i&&(m(d)?g=dn(i):g=xl(i,d),g?So=g:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),So._abbr}function xl(i,d){if(d!==null){var g,b=Xf;if(d.abbr=i,ze[i]!=null)J("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=Ea(d.parentLocale),g!=null)b=g._config;else return ho[d.parentLocale]||(ho[d.parentLocale]=[]),ho[d.parentLocale].push({name:i,config:d}),null;return ze[i]=new ne(A(b,d)),ho[i]&&ho[i].forEach(function(D){xl(D.name,D.config)}),Ln(i),ze[i]}else return delete ze[i],null}function hk(i,d){if(d!=null){var g,b,D=Xf;ze[i]!=null&&ze[i].parentLocale!=null?ze[i].set(A(ze[i]._config,d)):(b=Ea(i),b!=null&&(D=b._config),d=A(D,d),b==null&&(d.abbr=i),g=new ne(d),g.parentLocale=ze[i],ze[i]=g),Ln(i)}else ze[i]!=null&&(ze[i].parentLocale!=null?(ze[i]=ze[i].parentLocale,i===Ln()&&Ln(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 So;if(!s(i)){if(d=Ea(i),d)return d;i=[i]}return mk(i)}function Sk(){return Y(ze)}function Ml(i){var d,g=i._a;return g&&C(i).overflow===-2&&(d=g[sn]<0||g[sn]>11?sn:g[Qt]<1||g[Qt]>Dl(g[mt],g[sn])?Qt:g[et]<0||g[et]>24||g[et]===24&&(g[Wt]!==0||g[ln]!==0||g[er]!==0)?et:g[Wt]<0||g[Wt]>59?Wt:g[ln]<0||g[ln]>59?ln:g[er]<0||g[er]>999?er:-1,C(i)._overflowDayOfYear&&(d<mt||d>Qt)&&(d=Qt),C(i)._overflowWeeks&&d===-1&&(d=yN),C(i)._overflowWeekday&&d===-1&&(d=TN),C(i).overflow=d),i}var 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=/^\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)?)?$/,vk=/Z|[+-]\d\d(?::?\d\d)?/,wa=[["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]],_l=[["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/]],yk=/^\/?Date\((-?\d+)/i,Tk=/^(?:(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}))$/,Ek={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 eh(i){var d,g,b=i._i,D=gk.exec(b)||bk.exec(b),F,X,he,Ee,De=wa.length,gt=_l.length;if(D){for(C(i).iso=!0,d=0,g=De;d<g;d++)if(wa[d][1].exec(D[1])){X=wa[d][0],F=wa[d][2]!==!1;break}if(X==null){i._isValid=!1;return}if(D[3]){for(d=0,g=gt;d<g;d++)if(_l[d][1].exec(D[3])){he=(D[2]||" ")+_l[d][0];break}if(he==null){i._isValid=!1;return}}if(!F&&he!=null){i._isValid=!1;return}if(D[4])if(vk.exec(D[4]))Ee="Z";else{i._isValid=!1;return}i._f=X+(he||"")+(Ee||""),Ol(i)}else i._isValid=!1}function wk(i,d,g,b,D,F){var X=[Ck(i),Wf.indexOf(d),parseInt(g,10),parseInt(b,10),parseInt(D,10)];return F&&X.push(parseInt(F,10)),X}function Ck(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Dk(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Nk(i,d,g){if(i){var b=qf.indexOf(i),D=new Date(d[0],d[1],d[2]).getDay();if(b!==D)return C(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function kk(i,d,g){if(i)return Ek[i];if(d)return 0;var b=parseInt(g,10),D=b%100,F=(b-D)/100;return F*60+D}function th(i){var d=Tk.exec(Dk(i._i)),g;if(d){if(g=wk(d[4],d[3],d[2],d[5],d[6],d[7]),!Nk(d[1],g,i))return;i._a=g,i._tzm=kk(d[8],d[9],d[10]),i._d=mo.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),C(i).rfc2822=!0}else i._isValid=!1}function Ik(i){var d=yk.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(eh(i),i._isValid===!1)delete i._isValid;else return;if(th(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:r.createFromInputFallback(i)}r.createFromInputFallback=O("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 Nr(i,d,g){return i??d??g}function xk(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Ll(i){var d,g,b=[],D,F,X;if(!i._d){for(D=xk(i),i._w&&i._a[Qt]==null&&i._a[sn]==null&&Mk(i),i._dayOfYear!=null&&(X=Nr(i._a[mt],D[mt]),(i._dayOfYear>po(X)||i._dayOfYear===0)&&(C(i)._overflowDayOfYear=!0),g=mo(X,0,i._dayOfYear),i._a[sn]=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[et]===24&&i._a[Wt]===0&&i._a[ln]===0&&i._a[er]===0&&(i._nextDay=!0,i._a[et]=0),i._d=(i._useUTC?mo:BN).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[et]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==F&&(C(i).weekdayMismatch=!0)}}function Mk(i){var d,g,b,D,F,X,he,Ee,De;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(F=1,X=4,g=Nr(d.GG,i._a[mt],fo(Ye(),1,4).year),b=Nr(d.W,1),D=Nr(d.E,1),(D<1||D>7)&&(Ee=!0)):(F=i._locale._week.dow,X=i._locale._week.doy,De=fo(Ye(),F,X),g=Nr(d.gg,i._a[mt],De.year),b=Nr(d.w,De.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,X)?C(i)._overflowWeeks=!0:Ee!=null?C(i)._overflowWeekday=!0:(he=jf(g,b,D,F,X),i._a[mt]=he.year,i._dayOfYear=he.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Ol(i){if(i._f===r.ISO_8601){eh(i);return}if(i._f===r.RFC_2822){th(i);return}i._a=[],C(i).empty=!0;var d=""+i._i,g,b,D,F,X,he=d.length,Ee=0,De,gt;for(D=de(i._f,i._locale).match(q)||[],gt=D.length,g=0;g<gt;g++)F=D[g],b=(d.match(wl(F,i))||[])[0],b&&(X=d.substr(0,d.indexOf(b)),X.length>0&&C(i).unusedInput.push(X),d=d.slice(d.indexOf(b)+b.length),Ee+=b.length),j[F]?(b?C(i).empty=!1:C(i).unusedTokens.push(F),vN(F,b,i)):i._strict&&!b&&C(i).unusedTokens.push(F);C(i).charsLeftOver=he-Ee,d.length>0&&C(i).unusedInput.push(d),i._a[et]<=12&&C(i).bigHour===!0&&i._a[et]>0&&(C(i).bigHour=void 0),C(i).parsedDateParts=i._a.slice(0),C(i).meridiem=i._meridiem,i._a[et]=_k(i._locale,i._a[et],i._meridiem),De=C(i).era,De!==null&&(i._a[mt]=i._locale.erasConvertYear(De,i._a[mt])),Ll(i),Ml(i)}function _k(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 Lk(i){var d,g,b,D,F,X,he=!1,Ee=i._f.length;if(Ee===0){C(i).invalidFormat=!0,i._d=new Date(NaN);return}for(D=0;D<Ee;D++)F=0,X=!1,d=V({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[D],Ol(d),N(d)&&(X=!0),F+=C(d).charsLeftOver,F+=C(d).unusedTokens.length*10,C(d).score=F,he?F<b&&(b=F,g=d):(b==null||F<b||X)&&(b=F,g=d,X&&(he=!0));S(i,g||d)}function Ok(i){if(!i._d){var d=Fe(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)}),Ll(i)}}function Pk(i){var d=new R(Ml(nh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function nh(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)),w(d)?new R(Ml(d)):(u(d)?i._d=d:s(g)?Lk(i):g?Ol(i):Rk(i),N(i)||(i._d=null),i))}function Rk(i){var d=i._i;m(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?Ik(i):s(d)?(i._a=h(d.slice(0),function(g){return parseInt(g,10)}),Ll(i)):l(d)?Ok(i):f(d)?i._d=new Date(d):r.createFromInputFallback(i)}function rh(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)||s(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,Pk(F)}function Ye(i,d,g,b){return rh(i,d,g,b,!1)}var Bk=O("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()}),Ak=O("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 oh(i,d){var g,b;if(d.length===1&&s(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 Fk(){var i=[].slice.call(arguments,0);return oh("isBefore",i)}function Vk(){var i=[].slice.call(arguments,0);return oh("isAfter",i)}var $k=function(){return Date.now?Date.now():+new Date},go=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Kk(i){var d,g=!1,b,D=go.length;for(d in i)if(c(i,d)&&!(qe.call(go,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<D;++b)if(i[go[b]]){if(g)return!1;parseFloat(i[go[b]])!==Ce(i[go[b]])&&(g=!0)}return!0}function Hk(){return this._isValid}function Wk(){return Gt(NaN)}function Ca(i){var d=Fe(i),g=d.year||0,b=d.quarter||0,D=d.month||0,F=d.week||d.isoWeek||0,X=d.day||0,he=d.hour||0,Ee=d.minute||0,De=d.second||0,gt=d.millisecond||0;this._isValid=Kk(d),this._milliseconds=+gt+De*1e3+Ee*6e4+he*1e3*60*60,this._days=+X+F*7,this._months=+D+b*3+g*12,this._data={},this._locale=dn(),this._bubble()}function Da(i){return i instanceof Ca}function Pl(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function Gk(i,d,g){var b=Math.min(i.length,d.length),D=Math.abs(i.length-d.length),F=0,X;for(X=0;X<b;X++)Ce(i[X])!==Ce(d[X])&&F++;return F+D}function ah(i,d){B(i,0,0,function(){var g=this.utcOffset(),b="+";return g<0&&(g=-g,b="-"),b+H(~~(g/60),2)+d+H(~~g%60,2)})}ah("Z",":"),ah("ZZ",""),me("Z",Xt),me("ZZ",Xt),Ke(["Z","ZZ"],function(i,d,g){g._useUTC=!0,g._tzm=Rl(Xt,i)});var Yk=/([\+\-]|\d\d)/gi;function Rl(i,d){var g=(d||"").match(i),b,D,F;return g===null?null:(b=g[g.length-1]||[],D=(b+"").match(Yk)||["-",0,0],F=+(D[1]*60)+Ce(D[2]),F===0?0:D[0]==="+"?F:-F)}function Bl(i,d){var g,b;return d._isUTC?(g=d.clone(),b=(w(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 Al(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function Uk(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=Rl(Xt,i),i===null)return this}else Math.abs(i)<16&&!g&&(i=i*60);return!this._isUTC&&d&&(D=Al(this)),this._offset=i,this._isUTC=!0,D!=null&&this.add(D,"m"),b!==i&&(!d||this._changeInProgress?ch(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:Al(this)}function zk(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function jk(i){return this.utcOffset(0,i)}function qk(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Al(this),"m")),this}function Jk(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Rl(_n,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function Zk(i){return this.isValid()?(i=i?Ye(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function Xk(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Qk(){if(!m(this._isDSTShifted))return this._isDSTShifted;var i={},d;return V(i,this),i=nh(i),i._a?(d=i._isUTC?y(i._a):Ye(i._a),this._isDSTShifted=this.isValid()&&Gk(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function eI(){return this.isValid()?!this._isUTC:!1}function tI(){return this.isValid()?this._isUTC:!1}function sh(){return this.isValid()?this._isUTC&&this._offset===0:!1}var nI=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,rI=/^(-|\+)?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,X;return Da(i)?g={ms:i._milliseconds,d:i._days,M:i._months}:f(i)||!isNaN(+i)?(g={},d?g[d]=+i:g.milliseconds=+i):(b=nI.exec(i))?(D=b[1]==="-"?-1:1,g={y:0,d:Ce(b[Qt])*D,h:Ce(b[et])*D,m:Ce(b[Wt])*D,s:Ce(b[ln])*D,ms:Ce(Pl(b[er]*1e3))*D}):(b=rI.exec(i))?(D=b[1]==="-"?-1:1,g={y:tr(b[2],D),M:tr(b[3],D),w:tr(b[4],D),d:tr(b[5],D),h:tr(b[6],D),m:tr(b[7],D),s:tr(b[8],D)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(X=oI(Ye(g.from),Ye(g.to)),g={},g.ms=X.milliseconds,g.M=X.months),F=new Ca(g),Da(i)&&c(i,"_locale")&&(F._locale=i._locale),Da(i)&&c(i,"_isValid")&&(F._isValid=i._isValid),F}Gt.fn=Ca.prototype,Gt.invalid=Wk;function tr(i,d){var g=i&&parseFloat(i.replace(",","."));return(isNaN(g)?0:g)*d}function ih(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 oI(i,d){var g;return i.isValid()&&d.isValid()?(d=Bl(d,i),i.isBefore(d)?g=ih(i,d):(g=ih(d,i),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function lh(i,d){return function(g,b){var D,F;return b!==null&&!isNaN(+b)&&(J(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),ch(this,D,i),this}}function ch(i,d,g,b){var D=d._milliseconds,F=Pl(d._days),X=Pl(d._months);i.isValid()&&(b=b??!0,X&&Yf(i,uo(i,"Month")+X*g),F&&Hf(i,"Date",uo(i,"Date")+F*g),D&&i._d.setTime(i._d.valueOf()+D*g),b&&r.updateOffset(i,F||X))}var aI=lh(1,"add"),sI=lh(-1,"subtract");function dh(i){return typeof i=="string"||i instanceof String}function iI(i){return w(i)||u(i)||dh(i)||f(i)||cI(i)||lI(i)||i===null||i===void 0}function lI(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,X=b.length;for(D=0;D<X;D+=1)F=b[D],g=g||c(i,F);return d&&g}function cI(i){var d=s(i),g=!1;return d&&(g=i.filter(function(b){return!f(b)&&dh(i)}).length===0),d&&g}function dI(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 pI(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 uI(i,d){arguments.length===1&&(arguments[0]?iI(arguments[0])?(i=arguments[0],d=void 0):dI(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var g=i||Ye(),b=Bl(g,this).startOf("day"),D=r.calendarFormat(this,b)||"sameElse",F=d&&(L(d[D])?d[D].call(this,g):d[D]);return this.format(F||this.localeData().calendar(D,this,Ye(g)))}function mI(){return new R(this)}function fI(i,d){var g=w(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(d).valueOf()):!1}function hI(i,d){var g=w(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(d).valueOf()<g.valueOf()):!1}function SI(i,d,g,b){var D=w(i)?i:Ye(i),F=w(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 gI(i,d){var g=w(i)?i:Ye(i),b;return this.isValid()&&g.isValid()?(d=fe(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 bI(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function vI(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function yI(i,d,g){var b,D,F;if(!this.isValid())return NaN;if(b=Bl(i,this),!b.isValid())return NaN;switch(D=(b.utcOffset()-this.utcOffset())*6e4,d=fe(d),d){case"year":F=Na(this,b)/12;break;case"month":F=Na(this,b);break;case"quarter":F=Na(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:Bt(F)}function Na(i,d){if(i.date()<d.date())return-Na(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 TI(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function EI(i){if(!this.isValid())return null;var d=i!==!0,g=d?this.clone().utc():this;return g.year()<0||g.year()>9999?ee(g,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ee(g,"Z")):ee(g,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wI(){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 CI(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=ee(this,i);return this.localeData().postformat(d)}function DI(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ye(i).isValid())?Gt({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function NI(i){return this.from(Ye(),i)}function kI(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ye(i).isValid())?Gt({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function II(i){return this.to(Ye(),i)}function ph(i){var d;return i===void 0?this._locale._abbr:(d=dn(i),d!=null&&(this._locale=d),this)}var uh=O("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 mh(){return this._locale}var ka=1e3,kr=60*ka,Ia=60*kr,fh=(365*400+97)*24*Ia;function Ir(i,d){return(i%d+d)%d}function hh(i,d,g){return i<100&&i>=0?new Date(i+400,d,g)-fh:new Date(i,d,g).valueOf()}function Sh(i,d,g){return i<100&&i>=0?Date.UTC(i+400,d,g)-fh:Date.UTC(i,d,g)}function xI(i){var d,g;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Sh:hh,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-=Ir(d+(this._isUTC?0:this.utcOffset()*kr),Ia);break;case"minute":d=this._d.valueOf(),d-=Ir(d,kr);break;case"second":d=this._d.valueOf(),d-=Ir(d,ka);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function MI(i){var d,g;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Sh:hh,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+=Ia-Ir(d+(this._isUTC?0:this.utcOffset()*kr),Ia)-1;break;case"minute":d=this._d.valueOf(),d+=kr-Ir(d,kr)-1;break;case"second":d=this._d.valueOf(),d+=ka-Ir(d,ka)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function _I(){return this._d.valueOf()-(this._offset||0)*6e4}function LI(){return Math.floor(this.valueOf()/1e3)}function OI(){return new Date(this.valueOf())}function PI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function RI(){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 BI(){return this.isValid()?this.toISOString():null}function AI(){return N(this)}function FI(){return S({},C(this))}function VI(){return C(this).overflow}function $I(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),me("N",Fl),me("NN",Fl),me("NNN",Fl),me("NNNN",ZI),me("NNNNN",XI),Ke(["N","NN","NNN","NNNN","NNNNN"],function(i,d,g,b){var D=g._locale.erasParse(i,b,g._strict);D?C(g).era=D:C(g).invalidEra=i}),me("y",Ae),me("yy",Ae),me("yyy",Ae),me("yyyy",Ae),me("yo",QI),Ke(["y","yy","yyy","yyyy"],mt),Ke(["yo"],function(i,d,g,b){var D;g._locale._eraYearOrdinalRegex&&(D=i.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?d[mt]=g._locale.eraYearOrdinalParse(i,D):d[mt]=parseInt(i,10)});function KI(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 HI(i,d,g){var b,D,F=this.eras(),X,he,Ee;for(i=i.toUpperCase(),b=0,D=F.length;b<D;++b)if(X=F[b].name.toUpperCase(),he=F[b].abbr.toUpperCase(),Ee=F[b].narrow.toUpperCase(),g)switch(d){case"N":case"NN":case"NNN":if(he===i)return F[b];break;case"NNNN":if(X===i)return F[b];break;case"NNNNN":if(Ee===i)return F[b];break}else if([X,he,Ee].indexOf(i)>=0)return F[b]}function WI(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 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].name;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].narrow;return""}function UI(){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 zI(){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 jI(i){return c(this,"_erasNameRegex")||Vl.call(this),i?this._erasNameRegex:this._erasRegex}function qI(i){return c(this,"_erasAbbrRegex")||Vl.call(this),i?this._erasAbbrRegex:this._erasRegex}function JI(i){return c(this,"_erasNarrowRegex")||Vl.call(this),i?this._erasNarrowRegex:this._erasRegex}function Fl(i,d){return d.erasAbbrRegex(i)}function ZI(i,d){return d.erasNameRegex(i)}function XI(i,d){return d.erasNarrowRegex(i)}function QI(i,d){return d._eraYearOrdinalRegex||Ae}function Vl(){var i=[],d=[],g=[],b=[],D,F,X,he,Ee,De=this.eras();for(D=0,F=De.length;D<F;++D)X=an(De[D].name),he=an(De[D].abbr),Ee=an(De[D].narrow),d.push(X),i.push(he),g.push(Ee),b.push(X),b.push(he),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")}B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xa(i,d){B(0,[i,i.length],0,d)}xa("gggg","weekYear"),xa("ggggg","weekYear"),xa("GGGG","isoWeekYear"),xa("GGGGG","isoWeekYear"),me("G",pt),me("g",pt),me("GG",Se,we),me("gg",Se,we),me("GGGG",dt,Mn),me("gggg",dt,Mn),me("GGGGG",Tt,ue),me("ggggg",Tt,ue),co(["gggg","ggggg","GGGG","GGGGG"],function(i,d,g,b){d[b.substr(0,2)]=Ce(i)}),co(["gg","GG"],function(i,d,g,b){d[b]=r.parseTwoDigitYear(i)});function ex(i){return gh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function tx(i){return gh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function nx(){return cn(this.year(),1,4)}function rx(){return cn(this.isoWeekYear(),1,4)}function ox(){var i=this.localeData()._week;return cn(this.year(),i.dow,i.doy)}function ax(){var i=this.localeData()._week;return cn(this.weekYear(),i.dow,i.doy)}function gh(i,d,g,b,D){var F;return i==null?fo(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=jf(i,d,g,b,D),X=mo(F.year,0,F.dayOfYear);return this.year(X.getUTCFullYear()),this.month(X.getUTCMonth()),this.date(X.getUTCDate()),this}B("Q",0,"Qo","quarter"),me("Q",Qe),Ke("Q",function(i,d){d[sn]=(Ce(i)-1)*3});function ix(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}B("D",["DD",2],"Do","date"),me("D",Se,Te),me("DD",Se,we),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(Se)[0])});var bh=Dr("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ie),me("DDDD",Ht),Ke(["DDD","DDDD"],function(i,d,g){g._dayOfYear=Ce(i)});function lx(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}B("m",["mm",2],0,"minute"),me("m",Se,Xe),me("mm",Se,we),Ke(["m","mm"],Wt);var cx=Dr("Minutes",!1);B("s",["ss",2],0,"second"),me("s",Se,Xe),me("ss",Se,we),Ke(["s","ss"],ln);var dx=Dr("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return this.millisecond()*10}),B(0,["SSSSS",5],0,function(){return this.millisecond()*100}),B(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),B(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),B(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),B(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),me("S",Ie,Qe),me("SS",Ie,we),me("SSS",Ie,Ht);var On,vh;for(On="SSSS";On.length<=9;On+="S")me(On,Ae);function px(i,d){d[er]=Ce(("0."+i)*1e3)}for(On="S";On.length<=9;On+="S")Ke(On,px);vh=Dr("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");function ux(){return this._isUTC?"UTC":""}function mx(){return this._isUTC?"Coordinated Universal Time":""}var ce=R.prototype;ce.add=aI,ce.calendar=uI,ce.clone=mI,ce.diff=yI,ce.endOf=MI,ce.format=CI,ce.from=DI,ce.fromNow=NI,ce.to=kI,ce.toNow=II,ce.get=wN,ce.invalidAt=VI,ce.isAfter=fI,ce.isBefore=hI,ce.isBetween=SI,ce.isSame=gI,ce.isSameOrAfter=bI,ce.isSameOrBefore=vI,ce.isValid=AI,ce.lang=uh,ce.locale=ph,ce.localeData=mh,ce.max=Ak,ce.min=Bk,ce.parsingFlags=FI,ce.set=CN,ce.startOf=xI,ce.subtract=sI,ce.toArray=PI,ce.toObject=RI,ce.toDate=OI,ce.toISOString=EI,ce.inspect=wI,typeof Symbol<"u"&&Symbol.for!=null&&(ce[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ce.toJSON=BI,ce.toString=TI,ce.unix=LI,ce.valueOf=_I,ce.creationData=$I,ce.eraName=GI,ce.eraNarrow=YI,ce.eraAbbr=UI,ce.eraYear=zI,ce.year=Kf,ce.isLeapYear=EN,ce.weekYear=ex,ce.isoWeekYear=tx,ce.quarter=ce.quarters=ix,ce.month=Uf,ce.daysInMonth=ON,ce.week=ce.weeks=KN,ce.isoWeek=ce.isoWeeks=HN,ce.weeksInYear=ox,ce.weeksInWeekYear=ax,ce.isoWeeksInYear=nx,ce.isoWeeksInISOWeekYear=rx,ce.date=bh,ce.day=ce.days=tk,ce.weekday=nk,ce.isoWeekday=rk,ce.dayOfYear=lx,ce.hour=ce.hours=dk,ce.minute=ce.minutes=cx,ce.second=ce.seconds=dx,ce.millisecond=ce.milliseconds=vh,ce.utcOffset=Uk,ce.utc=jk,ce.local=qk,ce.parseZone=Jk,ce.hasAlignedHourOffset=Zk,ce.isDST=Xk,ce.isLocal=eI,ce.isUtcOffset=tI,ce.isUtc=sh,ce.isUTC=sh,ce.zoneAbbr=ux,ce.zoneName=mx,ce.dates=O("dates accessor is deprecated. Use date instead.",bh),ce.months=O("months accessor is deprecated. Use month instead",Uf),ce.years=O("years accessor is deprecated. Use year instead",Kf),ce.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zk),ce.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Qk);function fx(i){return Ye(i*1e3)}function hx(){return Ye.apply(null,arguments).parseZone()}function yh(i){return i}var Pe=ne.prototype;Pe.calendar=ae,Pe.longDateFormat=le,Pe.invalidDate=Ne,Pe.ordinal=lt,Pe.preparse=yh,Pe.postformat=yh,Pe.relativeTime=ct,Pe.pastFuture=Pt,Pe.set=Z,Pe.eras=KI,Pe.erasParse=HI,Pe.erasConvertYear=WI,Pe.erasAbbrRegex=qI,Pe.erasNameRegex=jI,Pe.erasNarrowRegex=JI,Pe.months=xN,Pe.monthsShort=MN,Pe.monthsParse=LN,Pe.monthsRegex=RN,Pe.monthsShortRegex=PN,Pe.week=AN,Pe.firstDayOfYear=$N,Pe.firstDayOfWeek=VN,Pe.weekdays=JN,Pe.weekdaysMin=XN,Pe.weekdaysShort=ZN,Pe.weekdaysParse=ek,Pe.weekdaysRegex=ok,Pe.weekdaysShortRegex=ak,Pe.weekdaysMinRegex=sk,Pe.isPM=lk,Pe.meridiem=pk;function Ma(i,d,g,b){var D=dn(),F=y().set(b,d);return D[g](F,i)}function Th(i,d,g){if(f(i)&&(d=i,i=void 0),i=i||"",d!=null)return Ma(i,d,g,"month");var b,D=[];for(b=0;b<12;b++)D[b]=Ma(i,b,g,"month");return D}function $l(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,X,he=[];if(g!=null)return Ma(d,(g+F)%7,b,"day");for(X=0;X<7;X++)he[X]=Ma(d,(X+F)%7,b,"day");return he}function Sx(i,d){return Th(i,d,"months")}function gx(i,d){return Th(i,d,"monthsShort")}function bx(i,d,g){return $l(i,d,g,"weekdays")}function vx(i,d,g){return $l(i,d,g,"weekdaysShort")}function yx(i,d,g){return $l(i,d,g,"weekdaysMin")}Ln("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=O("moment.lang is deprecated. Use moment.locale instead.",Ln),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",dn);var pn=Math.abs;function Tx(){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 Eh(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 Ex(i,d){return Eh(this,i,d,1)}function wx(i,d){return Eh(this,i,d,-1)}function wh(i){return i<0?Math.floor(i):Math.ceil(i)}function Cx(){var i=this._milliseconds,d=this._days,g=this._months,b=this._data,D,F,X,he,Ee;return i>=0&&d>=0&&g>=0||i<=0&&d<=0&&g<=0||(i+=wh(Kl(g)+d)*864e5,d=0,g=0),b.milliseconds=i%1e3,D=Bt(i/1e3),b.seconds=D%60,F=Bt(D/60),b.minutes=F%60,X=Bt(F/60),b.hours=X%24,d+=Bt(X/24),Ee=Bt(Ch(d)),g+=Ee,d-=wh(Kl(Ee)),he=Bt(g/12),g%=12,b.days=d,b.months=g,b.years=he,this}function Ch(i){return i*4800/146097}function Kl(i){return i*146097/4800}function Dx(i){if(!this.isValid())return NaN;var d,g,b=this._milliseconds;if(i=fe(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,g=this._months+Ch(d),i){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(d=this._days+Math.round(Kl(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 Dh=un("ms"),Nx=un("s"),kx=un("m"),Ix=un("h"),xx=un("d"),Mx=un("w"),_x=un("M"),Lx=un("Q"),Ox=un("y"),Px=Dh;function Rx(){return Gt(this)}function Bx(i){return i=fe(i),this.isValid()?this[i+"s"]():NaN}function nr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ax=nr("milliseconds"),Fx=nr("seconds"),Vx=nr("minutes"),$x=nr("hours"),Kx=nr("days"),Hx=nr("months"),Wx=nr("years");function Gx(){return Bt(this.days()/7)}var mn=Math.round,xr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Yx(i,d,g,b,D){return D.relativeTime(d||1,!!g,i,b)}function Ux(i,d,g,b){var D=Gt(i).abs(),F=mn(D.as("s")),X=mn(D.as("m")),he=mn(D.as("h")),Ee=mn(D.as("d")),De=mn(D.as("M")),gt=mn(D.as("w")),fn=mn(D.as("y")),Pn=F<=g.ss&&["s",F]||F<g.s&&["ss",F]||X<=1&&["m"]||X<g.m&&["mm",X]||he<=1&&["h"]||he<g.h&&["hh",he]||Ee<=1&&["d"]||Ee<g.d&&["dd",Ee];return g.w!=null&&(Pn=Pn||gt<=1&&["w"]||gt<g.w&&["ww",gt]),Pn=Pn||De<=1&&["M"]||De<g.M&&["MM",De]||fn<=1&&["y"]||["yy",fn],Pn[2]=d,Pn[3]=+i>0,Pn[4]=b,Yx.apply(null,Pn)}function zx(i){return i===void 0?mn:typeof i=="function"?(mn=i,!0):!1}function jx(i,d){return xr[i]===void 0?!1:d===void 0?xr[i]:(xr[i]=d,i==="s"&&(xr.ss=d-1),!0)}function qx(i,d){if(!this.isValid())return this.localeData().invalidDate();var g=!1,b=xr,D,F;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(g=i),typeof d=="object"&&(b=Object.assign({},xr,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),D=this.localeData(),F=Ux(this,!g,b,D),g&&(F=D.pastFuture(+this,F)),D.postformat(F)}var Hl=Math.abs;function Mr(i){return(i>0)-(i<0)||+i}function _a(){if(!this.isValid())return this.localeData().invalidDate();var i=Hl(this._milliseconds)/1e3,d=Hl(this._days),g=Hl(this._months),b,D,F,X,he=this.asSeconds(),Ee,De,gt,fn;return he?(b=Bt(i/60),D=Bt(b/60),i%=60,b%=60,F=Bt(g/12),g%=12,X=i?i.toFixed(3).replace(/\.?0+$/,""):"",Ee=he<0?"-":"",De=Mr(this._months)!==Mr(he)?"-":"",gt=Mr(this._days)!==Mr(he)?"-":"",fn=Mr(this._milliseconds)!==Mr(he)?"-":"",Ee+"P"+(F?De+F+"Y":"")+(g?De+g+"M":"")+(d?gt+d+"D":"")+(D||b||i?"T":"")+(D?fn+D+"H":"")+(b?fn+b+"M":"")+(i?fn+X+"S":"")):"P0D"}var xe=Ca.prototype;xe.isValid=Hk,xe.abs=Tx,xe.add=Ex,xe.subtract=wx,xe.as=Dx,xe.asMilliseconds=Dh,xe.asSeconds=Nx,xe.asMinutes=kx,xe.asHours=Ix,xe.asDays=xx,xe.asWeeks=Mx,xe.asMonths=_x,xe.asQuarters=Lx,xe.asYears=Ox,xe.valueOf=Px,xe._bubble=Cx,xe.clone=Rx,xe.get=Bx,xe.milliseconds=Ax,xe.seconds=Fx,xe.minutes=Vx,xe.hours=$x,xe.days=Kx,xe.weeks=Gx,xe.months=Hx,xe.years=Wx,xe.humanize=qx,xe.toISOString=_a,xe.toString=_a,xe.toJSON=_a,xe.locale=ph,xe.localeData=mh,xe.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_a),xe.lang=uh,B("X",0,0,"unix"),B("x",0,0,"valueOf"),me("x",pt),me("X",va),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 $={};function J(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),$[i]||(P(d),$[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function L(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function Z(i){var d,g;for(g in i)c(i,g)&&(d=i[g],L(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 ne(i){i!=null&&this.set(i)}var Y;Object.keys?Y=Object.keys:Y=function(i){var d,g=[];for(d in i)c(i,d)&&g.push(d);return g};var U={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ae(i,d,g){var b=this._calendar[i]||this._calendar.sameElse;return L(b)?b.call(d,g):b}function H(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 q=/(\[[^\[]*\])|(\\)?([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,oe={},j={};function B(i,d,g,b){var D=b;typeof b=="string"&&(D=function(){return this[b]()}),i&&(j[i]=D),d&&(j[d[0]]=function(){return H(D.apply(this,arguments),d[1],d[2])}),g&&(j[g]=function(){return this.localeData().ordinal(D.apply(this,arguments),i)})}function z(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Q(i){var d=i.match(q),g,b;for(g=0,b=d.length;g<b;g++)j[d[g]]?d[g]=j[d[g]]:d[g]=z(d[g]);return function(D){var F="",X;for(X=0;X<b;X++)F+=L(d[X])?d[X].call(D,i):d[X];return F}}function ee(i,d){return i.isValid()?(d=de(d,i.localeData()),oe[d]=oe[d]||Q(d),oe[d](i)):i.localeData().invalidDate()}function de(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 ie={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 le(i){var d=this._longDateFormat[i],g=this._longDateFormat[i.toUpperCase()];return d||!g?d:(this._longDateFormat[i]=g.match(q).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var se="Invalid date";function Ne(){return this._invalidDate}var ke="%d",it=/\d{1,2}/;function lt(i){return this._ordinal.replace("%d",i)}var ut={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 ct(i,d,g,b){var D=this._relativeTime[g];return L(D)?D(i,d,g,b):D.replace(/%d/i,i)}function Pt(i,d){var g=this._relativeTime[i>0?"future":"past"];return L(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 fe(i){return typeof i=="string"?je[i]||je[i.toLowerCase()]:void 0}function Fe(i){var d={},g,b;for(b in i)c(i,b)&&(g=fe(b),g&&(d[g]=i[b]));return d}var ve={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 Le(i){var d=[],g;for(g in i)c(i,g)&&d.push({unit:g,priority:ve[g]});return d.sort(function(b,D){return b.priority-D.priority}),d}var Qe=/\d/,we=/\d\d/,Ht=/\d{3}/,Mn=/\d{4}/,ue=/[+-]?\d{6}/,Se=/\d\d?/,Oe=/\d\d\d\d?/,Ze=/\d\d\d\d\d\d?/,Ie=/\d{1,3}/,dt=/\d{1,4}/,Tt=/[+-]?\d{1,6}/,Ae=/\d+/,pt=/[+-]?\d+/,_n=/Z|[+-]\d\d:?\d\d/gi,Xt=/Z|[+-]\d\d(?::?\d\d)?/gi,va=/[+-]?\d+(\.\d{1,3})?/,be=/[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,Te=/^[1-9]\d?/,Xe=/^([1-9]\d|\d)/,Rt;Rt={};function me(i,d,g){Rt[i]=L(d)?d:function(b,D){return b&&g?g:d}}function wl(i,d){return c(Rt,i)?Rt[i](d._strict,d._locale):new RegExp(bN(i))}function bN(i){return an(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,g,b,D,F){return g||b||D||F}))}function an(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Bt(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=Bt(d)),g}var Cl={};function Ke(i,d){var g,b=d,D;for(typeof i=="string"&&(i=[i]),f(d)&&(b=function(F,X){X[d]=Ce(F)}),D=i.length,g=0;g<D;g++)Cl[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 vN(i,d,g){d!=null&&c(Cl,i)&&Cl[i](d,g._a,g,i)}function ya(i){return i%4===0&&i%100!==0||i%400===0}var mt=0,sn=1,Qt=2,et=3,Wt=4,ln=5,er=6,yN=7,TN=8;B("Y",0,0,function(){var i=this.year();return i<=9999?H(i,4):"+"+i}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),me("Y",pt),me("YY",Se,we),me("YYYY",dt,Mn),me("YYYYY",Tt,ue),me("YYYYYY",Tt,ue),Ke(["YYYYY","YYYYYY"],mt),Ke("YYYY",function(i,d){d[mt]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),Ke("YY",function(i,d){d[mt]=r.parseTwoDigitYear(i)}),Ke("Y",function(i,d){d[mt]=parseInt(i,10)});function uo(i){return ya(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var Kf=Dr("FullYear",!0);function EN(){return ya(this.year())}function Dr(i,d){return function(g){return g!=null?(Hf(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 Hf(i,d,g){var b,D,F,X,he;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,X=i.month(),he=i.date(),he=he===29&&X===1&&!ya(F)?28:he,D?b.setUTCFullYear(F,X,he):b.setFullYear(F,X,he)}}function wN(i){return i=fe(i),L(this[i])?this[i]():this}function CN(i,d){if(typeof i=="object"){i=Fe(i);var g=Le(i),b,D=g.length;for(b=0;b<D;b++)this[g[b].unit](i[g[b].unit])}else if(i=fe(i),L(this[i]))return this[i](d);return this}function DN(i,d){return(i%d+d)%d}var qe;Array.prototype.indexOf?qe=Array.prototype.indexOf:qe=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Dl(i,d){if(isNaN(i)||isNaN(d))return NaN;var g=DN(d,12);return i+=(d-g)/12,g===1?ya(i)?29:28:31-g%7%2}B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),B("MMMM",0,0,function(i){return this.localeData().months(this,i)}),me("M",Se,Te),me("MM",Se,we),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[sn]=Ce(i)-1}),Ke(["MMM","MMMM"],function(i,d,g,b){var D=g._locale.monthsParse(i,b,g._strict);D!=null?d[sn]=D:C(g).invalidMonth=i});var NN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Wf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Gf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,kN=be,IN=be;function xN(i,d){return i?s(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Gf).test(d)?"format":"standalone"][i.month()]:s(this._months)?this._months:this._months.standalone}function MN(i,d){return i?s(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Gf.test(d)?"format":"standalone"][i.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _N(i,d,g){var b,D,F,X=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=qe.call(this._shortMonthsParse,X),D!==-1?D:null):(D=qe.call(this._longMonthsParse,X),D!==-1?D:null):d==="MMM"?(D=qe.call(this._shortMonthsParse,X),D!==-1?D:(D=qe.call(this._longMonthsParse,X),D!==-1?D:null)):(D=qe.call(this._longMonthsParse,X),D!==-1?D:(D=qe.call(this._shortMonthsParse,X),D!==-1?D:null))}function LN(i,d,g){var b,D,F;if(this._monthsParseExact)return _N.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 Yf(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,Dl(i.year(),g)),i._isUTC?i._d.setUTCMonth(g,b):i._d.setMonth(g,b),i}function Uf(i){return i!=null?(Yf(this,i),r.updateOffset(this,!0),this):mo(this,"Month")}function ON(){return Dl(this.year(),this.month())}function PN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||zf.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=kN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function RN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||zf.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=IN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function zf(){function i(Ee,De){return De.length-Ee.length}var d=[],g=[],b=[],D,F,X,he;for(D=0;D<12;D++)F=y([2e3,D]),X=an(this.monthsShort(F,"")),he=an(this.months(F,"")),d.push(X),g.push(he),b.push(he),b.push(X);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 BN(i,d,g,b,D,F,X){var he;return i<100&&i>=0?(he=new Date(i+400,d,g,b,D,F,X),isFinite(he.getFullYear())&&he.setFullYear(i)):he=new Date(i,d,g,b,D,F,X),he}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 Ta(i,d,g){var b=7+d-g,D=(7+fo(i,0,b).getUTCDay()-d)%7;return-D+b-1}function jf(i,d,g,b,D){var F=(7+g-b)%7,X=Ta(i,b,D),he=1+7*(d-1)+F+X,Ee,De;return he<=0?(Ee=i-1,De=uo(Ee)+he):he>uo(i)?(Ee=i+1,De=he-uo(i)):(Ee=i,De=he),{year:Ee,dayOfYear:De}}function ho(i,d,g){var b=Ta(i.year(),d,g),D=Math.floor((i.dayOfYear()-b-1)/7)+1,F,X;return D<1?(X=i.year()-1,F=D+cn(X,d,g)):D>cn(i.year(),d,g)?(F=D-cn(i.year(),d,g),X=i.year()+1):(X=i.year(),F=D),{week:F,year:X}}function cn(i,d,g){var b=Ta(i,d,g),D=Ta(i+1,d,g);return(uo(i)-b+D)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),me("w",Se,Te),me("ww",Se,we),me("W",Se,Te),me("WW",Se,we),po(["w","ww","W","WW"],function(i,d,g,b){d[b.substr(0,1)]=Ce(i)});function AN(i){return ho(i,this._week.dow,this._week.doy).week}var FN={dow:0,doy:6};function VN(){return this._week.dow}function $N(){return this._week.doy}function KN(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function HN(i){var d=ho(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}B("d",0,"do","day"),B("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),B("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),B("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),me("d",Se),me("e",Se),me("E",Se),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:C(g).invalidWeekday=i}),po(["d","e","E"],function(i,d,g,b){d[b]=Ce(i)});function WN(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function GN(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Nl(i,d){return i.slice(d,7).concat(i.slice(0,d))}var YN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),qf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),UN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zN=be,jN=be,qN=be;function JN(i,d){var g=s(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Nl(g,this._week.dow):i?g[i.day()]:g}function ZN(i){return i===!0?Nl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function XN(i){return i===!0?Nl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function QN(i,d,g){var b,D,F,X=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=qe.call(this._weekdaysParse,X),D!==-1?D:null):d==="ddd"?(D=qe.call(this._shortWeekdaysParse,X),D!==-1?D:null):(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null):d==="dddd"?(D=qe.call(this._weekdaysParse,X),D!==-1||(D=qe.call(this._shortWeekdaysParse,X),D!==-1)?D:(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null)):d==="ddd"?(D=qe.call(this._shortWeekdaysParse,X),D!==-1||(D=qe.call(this._weekdaysParse,X),D!==-1)?D:(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null)):(D=qe.call(this._minWeekdaysParse,X),D!==-1||(D=qe.call(this._weekdaysParse,X),D!==-1)?D:(D=qe.call(this._shortWeekdaysParse,X),D!==-1?D:null))}function ek(i,d,g){var b,D,F;if(this._weekdaysParseExact)return QN.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 tk(i){if(!this.isValid())return i!=null?this:NaN;var d=mo(this,"Day");return i!=null?(i=WN(i,this.localeData()),this.add(i-d,"d")):d}function nk(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 rk(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=GN(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function ok(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=zN),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function ak(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jN),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function sk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qN),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function kl(){function i(gt,fn){return fn.length-gt.length}var d=[],g=[],b=[],D=[],F,X,he,Ee,De;for(F=0;F<7;F++)X=y([2e3,1]).day(F),he=an(this.weekdaysMin(X,"")),Ee=an(this.weekdaysShort(X,"")),De=an(this.weekdays(X,"")),d.push(he),g.push(Ee),b.push(De),D.push(he),D.push(Ee),D.push(De);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 Il(){return this.hours()%12||12}function ik(){return this.hours()||24}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Il),B("k",["kk",2],0,ik),B("hmm",0,0,function(){return""+Il.apply(this)+H(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Il.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+H(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)});function Jf(i,d){B(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}Jf("a",!0),Jf("A",!1);function Zf(i,d){return d._meridiemParse}me("a",Zf),me("A",Zf),me("H",Se,Xe),me("h",Se,Te),me("k",Se,Te),me("HH",Se,we),me("hh",Se,we),me("kk",Se,we),me("hmm",Oe),me("hmmss",Ze),me("Hmm",Oe),me("Hmmss",Ze),Ke(["H","HH"],et),Ke(["k","kk"],function(i,d,g){var b=Ce(i);d[et]=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[et]=Ce(i),C(g).bigHour=!0}),Ke("hmm",function(i,d,g){var b=i.length-2;d[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b)),C(g).bigHour=!0}),Ke("hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D)),C(g).bigHour=!0}),Ke("Hmm",function(i,d,g){var b=i.length-2;d[et]=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[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D))});function lk(i){return(i+"").toLowerCase().charAt(0)==="p"}var ck=/[ap]\.?m?\.?/i,dk=Dr("Hours",!0);function pk(i,d,g){return i>11?g?"pm":"PM":g?"am":"AM"}var Xf={calendar:U,longDateFormat:ie,invalidDate:se,ordinal:ke,dayOfMonthOrdinalParse:it,relativeTime:ut,months:NN,monthsShort:Wf,week:FN,weekdays:YN,weekdaysMin:UN,weekdaysShort:qf,meridiemParse:ck},ze={},So={},go;function uk(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 Qf(i){return i&&i.toLowerCase().replace("_","-")}function mk(i){for(var d=0,g,b,D,F;d<i.length;){for(F=Qf(i[d]).split("-"),g=F.length,b=Qf(i[d+1]),b=b?b.split("-"):null;g>0;){if(D=Ea(F.slice(0,g).join("-")),D)return D;if(b&&b.length>=g&&uk(F,b)>=g-1)break;g--}d++}return go}function fk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Ea(i){var d=null,g;if(ze[i]===void 0&&e&&e.exports&&fk(i))try{d=go._abbr,g=Zt,g("./locale/"+i),Ln(d)}catch{ze[i]=null}return ze[i]}function Ln(i,d){var g;return i&&(m(d)?g=dn(i):g=xl(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 xl(i,d){if(d!==null){var g,b=Xf;if(d.abbr=i,ze[i]!=null)J("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=Ea(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 ne(A(b,d)),So[i]&&So[i].forEach(function(D){xl(D.name,D.config)}),Ln(i),ze[i]}else return delete ze[i],null}function hk(i,d){if(d!=null){var g,b,D=Xf;ze[i]!=null&&ze[i].parentLocale!=null?ze[i].set(A(ze[i]._config,d)):(b=Ea(i),b!=null&&(D=b._config),d=A(D,d),b==null&&(d.abbr=i),g=new ne(d),g.parentLocale=ze[i],ze[i]=g),Ln(i)}else ze[i]!=null&&(ze[i].parentLocale!=null?(ze[i]=ze[i].parentLocale,i===Ln()&&Ln(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(!s(i)){if(d=Ea(i),d)return d;i=[i]}return mk(i)}function Sk(){return Y(ze)}function Ml(i){var d,g=i._a;return g&&C(i).overflow===-2&&(d=g[sn]<0||g[sn]>11?sn:g[Qt]<1||g[Qt]>Dl(g[mt],g[sn])?Qt:g[et]<0||g[et]>24||g[et]===24&&(g[Wt]!==0||g[ln]!==0||g[er]!==0)?et:g[Wt]<0||g[Wt]>59?Wt:g[ln]<0||g[ln]>59?ln:g[er]<0||g[er]>999?er:-1,C(i)._overflowDayOfYear&&(d<mt||d>Qt)&&(d=Qt),C(i)._overflowWeeks&&d===-1&&(d=yN),C(i)._overflowWeekday&&d===-1&&(d=TN),C(i).overflow=d),i}var 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=/^\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)?)?$/,vk=/Z|[+-]\d\d(?::?\d\d)?/,wa=[["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]],_l=[["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/]],yk=/^\/?Date\((-?\d+)/i,Tk=/^(?:(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}))$/,Ek={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 eh(i){var d,g,b=i._i,D=gk.exec(b)||bk.exec(b),F,X,he,Ee,De=wa.length,gt=_l.length;if(D){for(C(i).iso=!0,d=0,g=De;d<g;d++)if(wa[d][1].exec(D[1])){X=wa[d][0],F=wa[d][2]!==!1;break}if(X==null){i._isValid=!1;return}if(D[3]){for(d=0,g=gt;d<g;d++)if(_l[d][1].exec(D[3])){he=(D[2]||" ")+_l[d][0];break}if(he==null){i._isValid=!1;return}}if(!F&&he!=null){i._isValid=!1;return}if(D[4])if(vk.exec(D[4]))Ee="Z";else{i._isValid=!1;return}i._f=X+(he||"")+(Ee||""),Ol(i)}else i._isValid=!1}function wk(i,d,g,b,D,F){var X=[Ck(i),Wf.indexOf(d),parseInt(g,10),parseInt(b,10),parseInt(D,10)];return F&&X.push(parseInt(F,10)),X}function Ck(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Dk(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Nk(i,d,g){if(i){var b=qf.indexOf(i),D=new Date(d[0],d[1],d[2]).getDay();if(b!==D)return C(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function kk(i,d,g){if(i)return Ek[i];if(d)return 0;var b=parseInt(g,10),D=b%100,F=(b-D)/100;return F*60+D}function th(i){var d=Tk.exec(Dk(i._i)),g;if(d){if(g=wk(d[4],d[3],d[2],d[5],d[6],d[7]),!Nk(d[1],g,i))return;i._a=g,i._tzm=kk(d[8],d[9],d[10]),i._d=fo.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),C(i).rfc2822=!0}else i._isValid=!1}function Ik(i){var d=yk.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(eh(i),i._isValid===!1)delete i._isValid;else return;if(th(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:r.createFromInputFallback(i)}r.createFromInputFallback=O("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 Nr(i,d,g){return i??d??g}function xk(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Ll(i){var d,g,b=[],D,F,X;if(!i._d){for(D=xk(i),i._w&&i._a[Qt]==null&&i._a[sn]==null&&Mk(i),i._dayOfYear!=null&&(X=Nr(i._a[mt],D[mt]),(i._dayOfYear>uo(X)||i._dayOfYear===0)&&(C(i)._overflowDayOfYear=!0),g=fo(X,0,i._dayOfYear),i._a[sn]=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[et]===24&&i._a[Wt]===0&&i._a[ln]===0&&i._a[er]===0&&(i._nextDay=!0,i._a[et]=0),i._d=(i._useUTC?fo:BN).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[et]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==F&&(C(i).weekdayMismatch=!0)}}function Mk(i){var d,g,b,D,F,X,he,Ee,De;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(F=1,X=4,g=Nr(d.GG,i._a[mt],ho(Ye(),1,4).year),b=Nr(d.W,1),D=Nr(d.E,1),(D<1||D>7)&&(Ee=!0)):(F=i._locale._week.dow,X=i._locale._week.doy,De=ho(Ye(),F,X),g=Nr(d.gg,i._a[mt],De.year),b=Nr(d.w,De.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,X)?C(i)._overflowWeeks=!0:Ee!=null?C(i)._overflowWeekday=!0:(he=jf(g,b,D,F,X),i._a[mt]=he.year,i._dayOfYear=he.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Ol(i){if(i._f===r.ISO_8601){eh(i);return}if(i._f===r.RFC_2822){th(i);return}i._a=[],C(i).empty=!0;var d=""+i._i,g,b,D,F,X,he=d.length,Ee=0,De,gt;for(D=de(i._f,i._locale).match(q)||[],gt=D.length,g=0;g<gt;g++)F=D[g],b=(d.match(wl(F,i))||[])[0],b&&(X=d.substr(0,d.indexOf(b)),X.length>0&&C(i).unusedInput.push(X),d=d.slice(d.indexOf(b)+b.length),Ee+=b.length),j[F]?(b?C(i).empty=!1:C(i).unusedTokens.push(F),vN(F,b,i)):i._strict&&!b&&C(i).unusedTokens.push(F);C(i).charsLeftOver=he-Ee,d.length>0&&C(i).unusedInput.push(d),i._a[et]<=12&&C(i).bigHour===!0&&i._a[et]>0&&(C(i).bigHour=void 0),C(i).parsedDateParts=i._a.slice(0),C(i).meridiem=i._meridiem,i._a[et]=_k(i._locale,i._a[et],i._meridiem),De=C(i).era,De!==null&&(i._a[mt]=i._locale.erasConvertYear(De,i._a[mt])),Ll(i),Ml(i)}function _k(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 Lk(i){var d,g,b,D,F,X,he=!1,Ee=i._f.length;if(Ee===0){C(i).invalidFormat=!0,i._d=new Date(NaN);return}for(D=0;D<Ee;D++)F=0,X=!1,d=V({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[D],Ol(d),N(d)&&(X=!0),F+=C(d).charsLeftOver,F+=C(d).unusedTokens.length*10,C(d).score=F,he?F<b&&(b=F,g=d):(b==null||F<b||X)&&(b=F,g=d,X&&(he=!0));S(i,g||d)}function Ok(i){if(!i._d){var d=Fe(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)}),Ll(i)}}function Pk(i){var d=new R(Ml(nh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function nh(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)),w(d)?new R(Ml(d)):(u(d)?i._d=d:s(g)?Lk(i):g?Ol(i):Rk(i),N(i)||(i._d=null),i))}function Rk(i){var d=i._i;m(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?Ik(i):s(d)?(i._a=h(d.slice(0),function(g){return parseInt(g,10)}),Ll(i)):l(d)?Ok(i):f(d)?i._d=new Date(d):r.createFromInputFallback(i)}function rh(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)||s(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,Pk(F)}function Ye(i,d,g,b){return rh(i,d,g,b,!1)}var Bk=O("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()}),Ak=O("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 oh(i,d){var g,b;if(d.length===1&&s(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 Fk(){var i=[].slice.call(arguments,0);return oh("isBefore",i)}function Vk(){var i=[].slice.call(arguments,0);return oh("isAfter",i)}var $k=function(){return Date.now?Date.now():+new Date},bo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Kk(i){var d,g=!1,b,D=bo.length;for(d in i)if(c(i,d)&&!(qe.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 Hk(){return this._isValid}function Wk(){return Gt(NaN)}function Ca(i){var d=Fe(i),g=d.year||0,b=d.quarter||0,D=d.month||0,F=d.week||d.isoWeek||0,X=d.day||0,he=d.hour||0,Ee=d.minute||0,De=d.second||0,gt=d.millisecond||0;this._isValid=Kk(d),this._milliseconds=+gt+De*1e3+Ee*6e4+he*1e3*60*60,this._days=+X+F*7,this._months=+D+b*3+g*12,this._data={},this._locale=dn(),this._bubble()}function Da(i){return i instanceof Ca}function Pl(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function Gk(i,d,g){var b=Math.min(i.length,d.length),D=Math.abs(i.length-d.length),F=0,X;for(X=0;X<b;X++)Ce(i[X])!==Ce(d[X])&&F++;return F+D}function ah(i,d){B(i,0,0,function(){var g=this.utcOffset(),b="+";return g<0&&(g=-g,b="-"),b+H(~~(g/60),2)+d+H(~~g%60,2)})}ah("Z",":"),ah("ZZ",""),me("Z",Xt),me("ZZ",Xt),Ke(["Z","ZZ"],function(i,d,g){g._useUTC=!0,g._tzm=Rl(Xt,i)});var Yk=/([\+\-]|\d\d)/gi;function Rl(i,d){var g=(d||"").match(i),b,D,F;return g===null?null:(b=g[g.length-1]||[],D=(b+"").match(Yk)||["-",0,0],F=+(D[1]*60)+Ce(D[2]),F===0?0:D[0]==="+"?F:-F)}function Bl(i,d){var g,b;return d._isUTC?(g=d.clone(),b=(w(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 Al(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function Uk(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=Rl(Xt,i),i===null)return this}else Math.abs(i)<16&&!g&&(i=i*60);return!this._isUTC&&d&&(D=Al(this)),this._offset=i,this._isUTC=!0,D!=null&&this.add(D,"m"),b!==i&&(!d||this._changeInProgress?ch(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:Al(this)}function zk(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function jk(i){return this.utcOffset(0,i)}function qk(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Al(this),"m")),this}function Jk(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Rl(_n,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function Zk(i){return this.isValid()?(i=i?Ye(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function Xk(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Qk(){if(!m(this._isDSTShifted))return this._isDSTShifted;var i={},d;return V(i,this),i=nh(i),i._a?(d=i._isUTC?y(i._a):Ye(i._a),this._isDSTShifted=this.isValid()&&Gk(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function eI(){return this.isValid()?!this._isUTC:!1}function tI(){return this.isValid()?this._isUTC:!1}function sh(){return this.isValid()?this._isUTC&&this._offset===0:!1}var nI=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,rI=/^(-|\+)?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,X;return Da(i)?g={ms:i._milliseconds,d:i._days,M:i._months}:f(i)||!isNaN(+i)?(g={},d?g[d]=+i:g.milliseconds=+i):(b=nI.exec(i))?(D=b[1]==="-"?-1:1,g={y:0,d:Ce(b[Qt])*D,h:Ce(b[et])*D,m:Ce(b[Wt])*D,s:Ce(b[ln])*D,ms:Ce(Pl(b[er]*1e3))*D}):(b=rI.exec(i))?(D=b[1]==="-"?-1:1,g={y:tr(b[2],D),M:tr(b[3],D),w:tr(b[4],D),d:tr(b[5],D),h:tr(b[6],D),m:tr(b[7],D),s:tr(b[8],D)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(X=oI(Ye(g.from),Ye(g.to)),g={},g.ms=X.milliseconds,g.M=X.months),F=new Ca(g),Da(i)&&c(i,"_locale")&&(F._locale=i._locale),Da(i)&&c(i,"_isValid")&&(F._isValid=i._isValid),F}Gt.fn=Ca.prototype,Gt.invalid=Wk;function tr(i,d){var g=i&&parseFloat(i.replace(",","."));return(isNaN(g)?0:g)*d}function ih(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 oI(i,d){var g;return i.isValid()&&d.isValid()?(d=Bl(d,i),i.isBefore(d)?g=ih(i,d):(g=ih(d,i),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function lh(i,d){return function(g,b){var D,F;return b!==null&&!isNaN(+b)&&(J(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),ch(this,D,i),this}}function ch(i,d,g,b){var D=d._milliseconds,F=Pl(d._days),X=Pl(d._months);i.isValid()&&(b=b??!0,X&&Yf(i,mo(i,"Month")+X*g),F&&Hf(i,"Date",mo(i,"Date")+F*g),D&&i._d.setTime(i._d.valueOf()+D*g),b&&r.updateOffset(i,F||X))}var aI=lh(1,"add"),sI=lh(-1,"subtract");function dh(i){return typeof i=="string"||i instanceof String}function iI(i){return w(i)||u(i)||dh(i)||f(i)||cI(i)||lI(i)||i===null||i===void 0}function lI(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,X=b.length;for(D=0;D<X;D+=1)F=b[D],g=g||c(i,F);return d&&g}function cI(i){var d=s(i),g=!1;return d&&(g=i.filter(function(b){return!f(b)&&dh(i)}).length===0),d&&g}function dI(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 pI(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 uI(i,d){arguments.length===1&&(arguments[0]?iI(arguments[0])?(i=arguments[0],d=void 0):dI(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var g=i||Ye(),b=Bl(g,this).startOf("day"),D=r.calendarFormat(this,b)||"sameElse",F=d&&(L(d[D])?d[D].call(this,g):d[D]);return this.format(F||this.localeData().calendar(D,this,Ye(g)))}function mI(){return new R(this)}function fI(i,d){var g=w(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(d).valueOf()):!1}function hI(i,d){var g=w(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(d).valueOf()<g.valueOf()):!1}function SI(i,d,g,b){var D=w(i)?i:Ye(i),F=w(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 gI(i,d){var g=w(i)?i:Ye(i),b;return this.isValid()&&g.isValid()?(d=fe(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 bI(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function vI(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function yI(i,d,g){var b,D,F;if(!this.isValid())return NaN;if(b=Bl(i,this),!b.isValid())return NaN;switch(D=(b.utcOffset()-this.utcOffset())*6e4,d=fe(d),d){case"year":F=Na(this,b)/12;break;case"month":F=Na(this,b);break;case"quarter":F=Na(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:Bt(F)}function Na(i,d){if(i.date()<d.date())return-Na(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 TI(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function EI(i){if(!this.isValid())return null;var d=i!==!0,g=d?this.clone().utc():this;return g.year()<0||g.year()>9999?ee(g,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ee(g,"Z")):ee(g,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wI(){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 CI(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=ee(this,i);return this.localeData().postformat(d)}function DI(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ye(i).isValid())?Gt({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function NI(i){return this.from(Ye(),i)}function kI(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ye(i).isValid())?Gt({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function II(i){return this.to(Ye(),i)}function ph(i){var d;return i===void 0?this._locale._abbr:(d=dn(i),d!=null&&(this._locale=d),this)}var uh=O("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 mh(){return this._locale}var ka=1e3,kr=60*ka,Ia=60*kr,fh=(365*400+97)*24*Ia;function Ir(i,d){return(i%d+d)%d}function hh(i,d,g){return i<100&&i>=0?new Date(i+400,d,g)-fh:new Date(i,d,g).valueOf()}function Sh(i,d,g){return i<100&&i>=0?Date.UTC(i+400,d,g)-fh:Date.UTC(i,d,g)}function xI(i){var d,g;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Sh:hh,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-=Ir(d+(this._isUTC?0:this.utcOffset()*kr),Ia);break;case"minute":d=this._d.valueOf(),d-=Ir(d,kr);break;case"second":d=this._d.valueOf(),d-=Ir(d,ka);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function MI(i){var d,g;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Sh:hh,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+=Ia-Ir(d+(this._isUTC?0:this.utcOffset()*kr),Ia)-1;break;case"minute":d=this._d.valueOf(),d+=kr-Ir(d,kr)-1;break;case"second":d=this._d.valueOf(),d+=ka-Ir(d,ka)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function _I(){return this._d.valueOf()-(this._offset||0)*6e4}function LI(){return Math.floor(this.valueOf()/1e3)}function OI(){return new Date(this.valueOf())}function PI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function RI(){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 BI(){return this.isValid()?this.toISOString():null}function AI(){return N(this)}function FI(){return S({},C(this))}function VI(){return C(this).overflow}function $I(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),me("N",Fl),me("NN",Fl),me("NNN",Fl),me("NNNN",ZI),me("NNNNN",XI),Ke(["N","NN","NNN","NNNN","NNNNN"],function(i,d,g,b){var D=g._locale.erasParse(i,b,g._strict);D?C(g).era=D:C(g).invalidEra=i}),me("y",Ae),me("yy",Ae),me("yyy",Ae),me("yyyy",Ae),me("yo",QI),Ke(["y","yy","yyy","yyyy"],mt),Ke(["yo"],function(i,d,g,b){var D;g._locale._eraYearOrdinalRegex&&(D=i.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?d[mt]=g._locale.eraYearOrdinalParse(i,D):d[mt]=parseInt(i,10)});function KI(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 HI(i,d,g){var b,D,F=this.eras(),X,he,Ee;for(i=i.toUpperCase(),b=0,D=F.length;b<D;++b)if(X=F[b].name.toUpperCase(),he=F[b].abbr.toUpperCase(),Ee=F[b].narrow.toUpperCase(),g)switch(d){case"N":case"NN":case"NNN":if(he===i)return F[b];break;case"NNNN":if(X===i)return F[b];break;case"NNNNN":if(Ee===i)return F[b];break}else if([X,he,Ee].indexOf(i)>=0)return F[b]}function WI(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 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].name;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].narrow;return""}function UI(){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 zI(){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 jI(i){return c(this,"_erasNameRegex")||Vl.call(this),i?this._erasNameRegex:this._erasRegex}function qI(i){return c(this,"_erasAbbrRegex")||Vl.call(this),i?this._erasAbbrRegex:this._erasRegex}function JI(i){return c(this,"_erasNarrowRegex")||Vl.call(this),i?this._erasNarrowRegex:this._erasRegex}function Fl(i,d){return d.erasAbbrRegex(i)}function ZI(i,d){return d.erasNameRegex(i)}function XI(i,d){return d.erasNarrowRegex(i)}function QI(i,d){return d._eraYearOrdinalRegex||Ae}function Vl(){var i=[],d=[],g=[],b=[],D,F,X,he,Ee,De=this.eras();for(D=0,F=De.length;D<F;++D)X=an(De[D].name),he=an(De[D].abbr),Ee=an(De[D].narrow),d.push(X),i.push(he),g.push(Ee),b.push(X),b.push(he),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")}B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xa(i,d){B(0,[i,i.length],0,d)}xa("gggg","weekYear"),xa("ggggg","weekYear"),xa("GGGG","isoWeekYear"),xa("GGGGG","isoWeekYear"),me("G",pt),me("g",pt),me("GG",Se,we),me("gg",Se,we),me("GGGG",dt,Mn),me("gggg",dt,Mn),me("GGGGG",Tt,ue),me("ggggg",Tt,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 ex(i){return gh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function tx(i){return gh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function nx(){return cn(this.year(),1,4)}function rx(){return cn(this.isoWeekYear(),1,4)}function ox(){var i=this.localeData()._week;return cn(this.year(),i.dow,i.doy)}function ax(){var i=this.localeData()._week;return cn(this.weekYear(),i.dow,i.doy)}function gh(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=jf(i,d,g,b,D),X=fo(F.year,0,F.dayOfYear);return this.year(X.getUTCFullYear()),this.month(X.getUTCMonth()),this.date(X.getUTCDate()),this}B("Q",0,"Qo","quarter"),me("Q",Qe),Ke("Q",function(i,d){d[sn]=(Ce(i)-1)*3});function ix(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}B("D",["DD",2],"Do","date"),me("D",Se,Te),me("DD",Se,we),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(Se)[0])});var bh=Dr("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ie),me("DDDD",Ht),Ke(["DDD","DDDD"],function(i,d,g){g._dayOfYear=Ce(i)});function lx(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}B("m",["mm",2],0,"minute"),me("m",Se,Xe),me("mm",Se,we),Ke(["m","mm"],Wt);var cx=Dr("Minutes",!1);B("s",["ss",2],0,"second"),me("s",Se,Xe),me("ss",Se,we),Ke(["s","ss"],ln);var dx=Dr("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return this.millisecond()*10}),B(0,["SSSSS",5],0,function(){return this.millisecond()*100}),B(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),B(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),B(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),B(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),me("S",Ie,Qe),me("SS",Ie,we),me("SSS",Ie,Ht);var On,vh;for(On="SSSS";On.length<=9;On+="S")me(On,Ae);function px(i,d){d[er]=Ce(("0."+i)*1e3)}for(On="S";On.length<=9;On+="S")Ke(On,px);vh=Dr("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");function ux(){return this._isUTC?"UTC":""}function mx(){return this._isUTC?"Coordinated Universal Time":""}var ce=R.prototype;ce.add=aI,ce.calendar=uI,ce.clone=mI,ce.diff=yI,ce.endOf=MI,ce.format=CI,ce.from=DI,ce.fromNow=NI,ce.to=kI,ce.toNow=II,ce.get=wN,ce.invalidAt=VI,ce.isAfter=fI,ce.isBefore=hI,ce.isBetween=SI,ce.isSame=gI,ce.isSameOrAfter=bI,ce.isSameOrBefore=vI,ce.isValid=AI,ce.lang=uh,ce.locale=ph,ce.localeData=mh,ce.max=Ak,ce.min=Bk,ce.parsingFlags=FI,ce.set=CN,ce.startOf=xI,ce.subtract=sI,ce.toArray=PI,ce.toObject=RI,ce.toDate=OI,ce.toISOString=EI,ce.inspect=wI,typeof Symbol<"u"&&Symbol.for!=null&&(ce[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ce.toJSON=BI,ce.toString=TI,ce.unix=LI,ce.valueOf=_I,ce.creationData=$I,ce.eraName=GI,ce.eraNarrow=YI,ce.eraAbbr=UI,ce.eraYear=zI,ce.year=Kf,ce.isLeapYear=EN,ce.weekYear=ex,ce.isoWeekYear=tx,ce.quarter=ce.quarters=ix,ce.month=Uf,ce.daysInMonth=ON,ce.week=ce.weeks=KN,ce.isoWeek=ce.isoWeeks=HN,ce.weeksInYear=ox,ce.weeksInWeekYear=ax,ce.isoWeeksInYear=nx,ce.isoWeeksInISOWeekYear=rx,ce.date=bh,ce.day=ce.days=tk,ce.weekday=nk,ce.isoWeekday=rk,ce.dayOfYear=lx,ce.hour=ce.hours=dk,ce.minute=ce.minutes=cx,ce.second=ce.seconds=dx,ce.millisecond=ce.milliseconds=vh,ce.utcOffset=Uk,ce.utc=jk,ce.local=qk,ce.parseZone=Jk,ce.hasAlignedHourOffset=Zk,ce.isDST=Xk,ce.isLocal=eI,ce.isUtcOffset=tI,ce.isUtc=sh,ce.isUTC=sh,ce.zoneAbbr=ux,ce.zoneName=mx,ce.dates=O("dates accessor is deprecated. Use date instead.",bh),ce.months=O("months accessor is deprecated. Use month instead",Uf),ce.years=O("years accessor is deprecated. Use year instead",Kf),ce.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zk),ce.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Qk);function fx(i){return Ye(i*1e3)}function hx(){return Ye.apply(null,arguments).parseZone()}function yh(i){return i}var Pe=ne.prototype;Pe.calendar=ae,Pe.longDateFormat=le,Pe.invalidDate=Ne,Pe.ordinal=lt,Pe.preparse=yh,Pe.postformat=yh,Pe.relativeTime=ct,Pe.pastFuture=Pt,Pe.set=Z,Pe.eras=KI,Pe.erasParse=HI,Pe.erasConvertYear=WI,Pe.erasAbbrRegex=qI,Pe.erasNameRegex=jI,Pe.erasNarrowRegex=JI,Pe.months=xN,Pe.monthsShort=MN,Pe.monthsParse=LN,Pe.monthsRegex=RN,Pe.monthsShortRegex=PN,Pe.week=AN,Pe.firstDayOfYear=$N,Pe.firstDayOfWeek=VN,Pe.weekdays=JN,Pe.weekdaysMin=XN,Pe.weekdaysShort=ZN,Pe.weekdaysParse=ek,Pe.weekdaysRegex=ok,Pe.weekdaysShortRegex=ak,Pe.weekdaysMinRegex=sk,Pe.isPM=lk,Pe.meridiem=pk;function Ma(i,d,g,b){var D=dn(),F=y().set(b,d);return D[g](F,i)}function Th(i,d,g){if(f(i)&&(d=i,i=void 0),i=i||"",d!=null)return Ma(i,d,g,"month");var b,D=[];for(b=0;b<12;b++)D[b]=Ma(i,b,g,"month");return D}function $l(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,X,he=[];if(g!=null)return Ma(d,(g+F)%7,b,"day");for(X=0;X<7;X++)he[X]=Ma(d,(X+F)%7,b,"day");return he}function Sx(i,d){return Th(i,d,"months")}function gx(i,d){return Th(i,d,"monthsShort")}function bx(i,d,g){return $l(i,d,g,"weekdays")}function vx(i,d,g){return $l(i,d,g,"weekdaysShort")}function yx(i,d,g){return $l(i,d,g,"weekdaysMin")}Ln("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=O("moment.lang is deprecated. Use moment.locale instead.",Ln),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",dn);var pn=Math.abs;function Tx(){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 Eh(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 Ex(i,d){return Eh(this,i,d,1)}function wx(i,d){return Eh(this,i,d,-1)}function wh(i){return i<0?Math.floor(i):Math.ceil(i)}function Cx(){var i=this._milliseconds,d=this._days,g=this._months,b=this._data,D,F,X,he,Ee;return i>=0&&d>=0&&g>=0||i<=0&&d<=0&&g<=0||(i+=wh(Kl(g)+d)*864e5,d=0,g=0),b.milliseconds=i%1e3,D=Bt(i/1e3),b.seconds=D%60,F=Bt(D/60),b.minutes=F%60,X=Bt(F/60),b.hours=X%24,d+=Bt(X/24),Ee=Bt(Ch(d)),g+=Ee,d-=wh(Kl(Ee)),he=Bt(g/12),g%=12,b.days=d,b.months=g,b.years=he,this}function Ch(i){return i*4800/146097}function Kl(i){return i*146097/4800}function Dx(i){if(!this.isValid())return NaN;var d,g,b=this._milliseconds;if(i=fe(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,g=this._months+Ch(d),i){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(d=this._days+Math.round(Kl(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 Dh=un("ms"),Nx=un("s"),kx=un("m"),Ix=un("h"),xx=un("d"),Mx=un("w"),_x=un("M"),Lx=un("Q"),Ox=un("y"),Px=Dh;function Rx(){return Gt(this)}function Bx(i){return i=fe(i),this.isValid()?this[i+"s"]():NaN}function nr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ax=nr("milliseconds"),Fx=nr("seconds"),Vx=nr("minutes"),$x=nr("hours"),Kx=nr("days"),Hx=nr("months"),Wx=nr("years");function Gx(){return Bt(this.days()/7)}var mn=Math.round,xr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Yx(i,d,g,b,D){return D.relativeTime(d||1,!!g,i,b)}function Ux(i,d,g,b){var D=Gt(i).abs(),F=mn(D.as("s")),X=mn(D.as("m")),he=mn(D.as("h")),Ee=mn(D.as("d")),De=mn(D.as("M")),gt=mn(D.as("w")),fn=mn(D.as("y")),Pn=F<=g.ss&&["s",F]||F<g.s&&["ss",F]||X<=1&&["m"]||X<g.m&&["mm",X]||he<=1&&["h"]||he<g.h&&["hh",he]||Ee<=1&&["d"]||Ee<g.d&&["dd",Ee];return g.w!=null&&(Pn=Pn||gt<=1&&["w"]||gt<g.w&&["ww",gt]),Pn=Pn||De<=1&&["M"]||De<g.M&&["MM",De]||fn<=1&&["y"]||["yy",fn],Pn[2]=d,Pn[3]=+i>0,Pn[4]=b,Yx.apply(null,Pn)}function zx(i){return i===void 0?mn:typeof i=="function"?(mn=i,!0):!1}function jx(i,d){return xr[i]===void 0?!1:d===void 0?xr[i]:(xr[i]=d,i==="s"&&(xr.ss=d-1),!0)}function qx(i,d){if(!this.isValid())return this.localeData().invalidDate();var g=!1,b=xr,D,F;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(g=i),typeof d=="object"&&(b=Object.assign({},xr,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),D=this.localeData(),F=Ux(this,!g,b,D),g&&(F=D.pastFuture(+this,F)),D.postformat(F)}var Hl=Math.abs;function Mr(i){return(i>0)-(i<0)||+i}function _a(){if(!this.isValid())return this.localeData().invalidDate();var i=Hl(this._milliseconds)/1e3,d=Hl(this._days),g=Hl(this._months),b,D,F,X,he=this.asSeconds(),Ee,De,gt,fn;return he?(b=Bt(i/60),D=Bt(b/60),i%=60,b%=60,F=Bt(g/12),g%=12,X=i?i.toFixed(3).replace(/\.?0+$/,""):"",Ee=he<0?"-":"",De=Mr(this._months)!==Mr(he)?"-":"",gt=Mr(this._days)!==Mr(he)?"-":"",fn=Mr(this._milliseconds)!==Mr(he)?"-":"",Ee+"P"+(F?De+F+"Y":"")+(g?De+g+"M":"")+(d?gt+d+"D":"")+(D||b||i?"T":"")+(D?fn+D+"H":"")+(b?fn+b+"M":"")+(i?fn+X+"S":"")):"P0D"}var xe=Ca.prototype;xe.isValid=Hk,xe.abs=Tx,xe.add=Ex,xe.subtract=wx,xe.as=Dx,xe.asMilliseconds=Dh,xe.asSeconds=Nx,xe.asMinutes=kx,xe.asHours=Ix,xe.asDays=xx,xe.asWeeks=Mx,xe.asMonths=_x,xe.asQuarters=Lx,xe.asYears=Ox,xe.valueOf=Px,xe._bubble=Cx,xe.clone=Rx,xe.get=Bx,xe.milliseconds=Ax,xe.seconds=Fx,xe.minutes=Vx,xe.hours=$x,xe.days=Kx,xe.weeks=Gx,xe.months=Hx,xe.years=Wx,xe.humanize=qx,xe.toISOString=_a,xe.toString=_a,xe.toJSON=_a,xe.locale=ph,xe.localeData=mh,xe.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_a),xe.lang=uh,B("X",0,0,"unix"),B("x",0,0,"valueOf"),me("x",pt),me("X",va),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",a(Ye),r.fn=ce,r.min=Fk,r.max=Vk,r.now=$k,r.utc=y,r.unix=fx,r.months=Sx,r.isDate=u,r.locale=Ln,r.invalid=M,r.duration=Gt,r.isMoment=w,r.weekdays=bx,r.parseZone=hx,r.localeData=dn,r.isDuration=Da,r.monthsShort=gx,r.weekdaysMin=yx,r.defineLocale=xl,r.updateLocale=hk,r.locales=Sk,r.weekdaysShort=vx,r.normalizeUnits=fe,r.relativeTimeRounding=zx,r.relativeTimeThreshold=jx,r.calendarFormat=pI,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})}(hi)),hi.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(a){var s=a%10,l=~~(a%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return a+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(a){var s=a%10,l=~~(a%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return a+l}});return r})}(),function(e,t){(function(n,r){r(typeof Zt=="function"?tn():n.moment)})(Ut,function(n){//! moment.js locale configuration
|
|
@@ -2466,7 +2466,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2466
2466
|
</SpsForm>
|
|
2467
2467
|
)
|
|
2468
2468
|
}
|
|
2469
|
-
`}}}},XE=
|
|
2469
|
+
`}}}},XE=ko||Ka,QE={alignLeft:"boolean",disabled:"boolean",icon:"SpsIcon",kind:"DropdownKind",label:"string",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string",tallOptionList:"boolean",onOpen:"() => void",onClose:"() => void",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function zn(e){const{action:t,alignLeft:n,className:r,disabled:a,icon:s,id:l,kind:c,label:p,options:m=[],tabIndex:f,spinning:u,spinningTitle:h,tallOptionList:S,unsafelyReplaceClassName:y,onOpen:T,onClose:C,loading:E,maxHeightOptionListPx:N,maxHeightOptionListRem:M,disableOptionsMemoization:I,...k}=e,{t:V}=o.useContext(He),R=Sn(l),[w,P]=o.useState(!1),[O,$]=o.useState(!1),[J,L]=o.useState(),Z=o.useRef(null),A=m.map(ie=>typeof ie=="function"?ie:Object.assign(ie[1],{...W.SPS_ACTION_DEFAULTS,...ie[0]})),ne=`${R.current}-button`,Y=`${R.current}-menu`;let U,ae;p?(ae=c||W.DropdownKind.DEFAULT,U=s):(ae=W.DropdownKind.ICON,U=s||W.SpsIcon.ELLIPSES);const H=o.useRef(null);o.useEffect(()=>{w&&T?T():!w&&C&&C()},[w]);function q(){P(!1)}function re(ie){ie.stopPropagation(),ie.nativeEvent.stopImmediatePropagation(),ie.preventDefault(),!a&&!u&&P(!w)}function oe(ie){P(ie)}function j(){P(!1)}function B(ie){a||(["Up","ArrowUp","Down","ArrowDown"].indexOf(ie.key)>-1&&ie.preventDefault(),ie.persist(),L(ie))}function z(ie){ie.detail!==R.current&&P(!1)}o.useEffect(()=>(document.addEventListener("click",q),document.addEventListener("DropdownOpened",z),()=>{document.removeEventListener("click",q),document.removeEventListener("DropdownOpened",z)}),[]),o.useEffect(()=>{if(w){Z.current&&XE(Z.current,{scrollMode:"if-needed"});const ie=document.createEvent("CustomEvent");ie.initCustomEvent("DropdownOpened",!1,!1,R.current),document.dispatchEvent(ie)}},[w]);const Q=G(y||"sps-dropdown",w&&"sps-dropdown--open",w&&"z-stratum-dropdown",O&&"sps-dropdown--opens-upward",!p&&"sps-dropdown--no-label",a&&"disabled",r),ee=G("sps-button",`sps-button--${ae}`,a&&"sps-button--disabled",u&&"sps-button--spinning"),de=ae===W.DropdownKind.ICON&&!n?[W.Position.BOTTOM_RIGHT,W.Position.TOP_RIGHT]:void 0;return o.useEffect(()=>{let ie;return w&&(ie=()=>{P(!1)},window.addEventListener("resize",ie)),()=>{ie&&window.removeEventListener("resize",ie)}},[w]),Br({isOpen:w,rootRef:H}),o.createElement("div",{...k,id:R.current,className:Q,onKeyDown:B},o.createElement("div",{onClick:re,className:ee,ref:H},o.createElement("button",{type:"button",id:ne,ref:Z,"aria-haspopup":"true","aria-controls":Y,"aria-expanded":w?!0:void 0,tabIndex:f,disabled:a,onClick:re},o.createElement("i",{className:G("sps-icon",`sps-icon-${U}`)}),p&&o.createElement("span",null,p),u&&o.createElement("div",{className:"sps-spinner",key:1},h||V("design-system:button.spinningTitle")))),o.createElement(Rr,{positionOverride:de,isOpen:w,"aria-labelledby":ne,keyDown:J,onOptionSelected:j,id:Y,attachTo:H,onPositionFlip:$,onSelfToggle:oe,options:A,offsets:[0,0],tall:S,optionRole:"option",loading:E,maxHeightPx:N,maxHeightRem:M,disableOptionsMemoization:I,specialAction:t}))}Object.assign(zn,{props:QE,displayName:"SpsDropdown"});const gu={labelled:{label:"Labelled",examples:{default:{description:"<h3> Default Dropdown</h3>",react:v.code`
|
|
2470
2470
|
import {
|
|
2471
2471
|
SpsDropdown,
|
|
2472
2472
|
useSpsAction,
|
|
@@ -5387,7 +5387,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
5387
5387
|
</>
|
|
5388
5388
|
);
|
|
5389
5389
|
}
|
|
5390
|
-
`}}}},bw={captionKey:"string",clearSearchOnBlur:"boolean",clearSearchOnEnter:"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 Di({action:e,captionKey:t,className:n,clearSearchOnBlur:r,clearSearchOnEnter:a,debounce:s,disabled:l,disableSelected:c=!1,comparisonKey:p,formControl:m,formMeta:f,hideSelected:u,id:h,onChange:S,onSearchChange:y,options:T,placeholder:C,tallOptionList:E,textKey:N,unsafelyReplaceClassName:M,value:I,zeroState:k="There are no matching options.",loading:V,filterByTextAndCaptionKey:R,icon:w,maxHeightOptionListPx:P,maxHeightOptionListRem:O,disableOptionsMemoization:$,"data-testid":J,...L}){const Z=I??[],A=f||m,{wrapperId:ne,controlId:Y}=bt(h,A),[U,ae]=qt({keyDown:null,opensUpward:!1,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{y&&y(U.searchText)},[U.searchText]);const H=o.useRef(null),q=o.useRef(null),re=o.useRef(null),oe=o.useRef(null),j=o.useRef(null);function B(){r&&ae({searchText:""})}const{showPopup:z,doShowPopup:Q,doHidePopup:ee}=dr(H,oe,B);function de(){ae({activeTagIndex:null}),Q()}function ie(){setTimeout(()=>{var ve;(ve=re.current)==null||ve.focus()},0)}function le(ve){if(j.current&&j.current.children.length&&typeof ve=="number"){const Le=j.current.children[ve],Qe=Le==null?void 0:Le.querySelector(".sps-clickable-tag__icon");Qe&&Qe.focus()}}function se(ve){ae({searchText:""}),A&&(A.setValue(ve),A.markAsDirty()),S&&S(new gn({value:ve}))}function Ne(ve){Z.indexOf(ve)===-1&&se([...Z,ve]),ie()}function ke(ve){const Le=Z.filter((Qe,we)=>we!==ve);se(Le)}function it(ve){ae({searchText:ve.target.value})}function lt(ve){var Le,Qe;if(!l){const we=!u&&!ve.target.selectionStart&&Z&&Z.length;switch(ve.key){case"Backspace":if(U.activeTagIndex===Z.length-1){ke(U.activeTagIndex),ie();return}if(U.activeTagIndex!==null){ke(U.activeTagIndex);return}if(we){se(Z.slice(0,Z.length-1));return}break;case"Delete":if(U.activeTagIndex!==null){ke(U.activeTagIndex);return}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":ve.preventDefault();break;case"Left":case"ArrowLeft":if(we){U.activeTagIndex===null?(ae({activeTagIndex:Z.length-1}),ee(),le(Z.length-1)):U.activeTagIndex>0&&(ae({activeTagIndex:U.activeTagIndex-1}),ee(),le(U.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(U.activeTagIndex!==null){U.activeTagIndex===Z.length-1?(ae({activeTagIndex:null}),Q(),(Le=re.current)==null||Le.focus()):(ae({activeTagIndex:U.activeTagIndex+1}),le(U.activeTagIndex+1));return}break;case"Tab":ee();break;case"Escape":ee(),(Qe=re.current)==null||Qe.blur();break;case"Enter":a&&ae({searchText:""});break}ve.persist(),ae({keyDown:ve})}}function ut(ve){ae({opensUpward:ve})}function ct(ve){se([]),ve.stopPropagation()}function Pt(ve){ae({optionIds:new Array(ve).fill("").map((Le,Qe)=>`${ne}-options-option-${Qe}`).join(",")})}const je=o.useCallback(()=>{ae({searchText:""}),ie()},[]),fe=G(M||"sps-multi-select",z&&"sps-multi-select--open",z&&"z-stratum-dropdown",U.opensUpward&&"sps-multi-select--opens-upward",l&&"sps-form-control--disabled",n),Fe=new Array(Z.length).fill(0).map((ve,Le)=>`${ne}_tag-${Le}`);return o.useEffect(()=>{let ve;return z&&(ve=()=>{ee()},window.addEventListener("resize",ve)),()=>{ve&&window.removeEventListener("resize",ve)}},[z]),
|
|
5390
|
+
`}}}},bw={captionKey:"string",clearSearchOnBlur:"boolean",clearSearchOnEnter:"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 Di({action:e,captionKey:t,className:n,clearSearchOnBlur:r,clearSearchOnEnter:a,debounce:s,disabled:l,disableSelected:c=!1,comparisonKey:p,formControl:m,formMeta:f,hideSelected:u,id:h,onChange:S,onSearchChange:y,options:T,placeholder:C,tallOptionList:E,textKey:N,unsafelyReplaceClassName:M,value:I,zeroState:k="There are no matching options.",loading:V,filterByTextAndCaptionKey:R,icon:w,maxHeightOptionListPx:P,maxHeightOptionListRem:O,disableOptionsMemoization:$,"data-testid":J,...L}){const Z=I??[],A=f||m,{wrapperId:ne,controlId:Y}=bt(h,A),[U,ae]=qt({keyDown:null,opensUpward:!1,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{y&&y(U.searchText)},[U.searchText]);const H=o.useRef(null),q=o.useRef(null),re=o.useRef(null),oe=o.useRef(null),j=o.useRef(null);function B(){r&&ae({searchText:""})}const{showPopup:z,doShowPopup:Q,doHidePopup:ee}=dr(H,oe,B);function de(){ae({activeTagIndex:null}),Q()}function ie(){setTimeout(()=>{var ve;(ve=re.current)==null||ve.focus()},0)}function le(ve){if(j.current&&j.current.children.length&&typeof ve=="number"){const Le=j.current.children[ve],Qe=Le==null?void 0:Le.querySelector(".sps-clickable-tag__icon");Qe&&Qe.focus()}}function se(ve){ae({searchText:""}),A&&(A.setValue(ve),A.markAsDirty()),S&&S(new gn({value:ve}))}function Ne(ve){Z.indexOf(ve)===-1&&se([...Z,ve]),ie()}function ke(ve){const Le=Z.filter((Qe,we)=>we!==ve);se(Le)}function it(ve){ae({searchText:ve.target.value})}function lt(ve){var Le,Qe;if(!l){const we=!u&&!ve.target.selectionStart&&Z&&Z.length;switch(ve.key){case"Backspace":if(U.activeTagIndex===Z.length-1){ke(U.activeTagIndex),ie();return}if(U.activeTagIndex!==null){ke(U.activeTagIndex);return}if(we){se(Z.slice(0,Z.length-1));return}break;case"Delete":if(U.activeTagIndex!==null){ke(U.activeTagIndex);return}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":ve.preventDefault();break;case"Left":case"ArrowLeft":if(we){U.activeTagIndex===null?(ae({activeTagIndex:Z.length-1}),ee(),le(Z.length-1)):U.activeTagIndex>0&&(ae({activeTagIndex:U.activeTagIndex-1}),ee(),le(U.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(U.activeTagIndex!==null){U.activeTagIndex===Z.length-1?(ae({activeTagIndex:null}),Q(),(Le=re.current)==null||Le.focus()):(ae({activeTagIndex:U.activeTagIndex+1}),le(U.activeTagIndex+1));return}break;case"Tab":ee();break;case"Escape":ee(),(Qe=re.current)==null||Qe.blur();break;case"Enter":a&&ae({searchText:""});break}ve.persist(),ae({keyDown:ve})}}function ut(ve){ae({opensUpward:ve})}function ct(ve){se([]),ve.stopPropagation()}function Pt(ve){ae({optionIds:new Array(ve).fill("").map((Le,Qe)=>`${ne}-options-option-${Qe}`).join(",")})}const je=o.useCallback(()=>{ae({searchText:""}),ie()},[]),fe=G(M||"sps-multi-select",z&&"sps-multi-select--open",z&&"z-stratum-dropdown",U.opensUpward&&"sps-multi-select--opens-upward",l&&"sps-form-control--disabled",n),Fe=new Array(Z.length).fill(0).map((ve,Le)=>`${ne}_tag-${Le}`);return o.useEffect(()=>{let ve;return z&&(ve=()=>{ee()},window.addEventListener("resize",ve)),()=>{ve&&window.removeEventListener("resize",ve)}},[z]),Br({isOpen:z,rootRef:H}),o.createElement(at,{id:ne,className:fe,formControl:m,formMeta:f,ref:H,inputRef:re,focusInputOnClick:!0,onKeyDown:lt,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":Fe[U.activeTagIndex||0],"aria-owns":U.optionIds},o.createElement("div",{className:"sps-text-input",ref:q},o.createElement("div",{className:G("sps-form-control",Z&&!l&&"sps-form-control--clearable")},w&&o.createElement("i",{className:G("sps-text-input__icon","sps-icon",`sps-icon-${w}`)}),o.createElement("div",{className:"sps-multi-select__tags-and-input",ref:j},u?null:Z.map((ve,Le)=>o.createElement(Ar,{id:Fe[Le],role:"option",disabled:l,"aria-selected":"true",key:Fe[Le],onRemove:()=>ke(Le)},N?ve[N]:ve)),o.createElement("input",{type:"text",ref:re,"data-testid":`${J}__option-list-input`,value:U.searchText,className:"sps-text-input__input",placeholder:Z.length===0?C:void 0,id:Y,onClick:de,onChange:it,onFocus:de,onKeyDown:lt,disabled:l,role:"listbox","aria-multiselectable":"true","aria-owns":Fe.join(" "),...L})),Z.length!==0&&!l?o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:ve=>ct(ve)}):null)),o.createElement(Rr,{id:`${ne}_options`,ref:oe,"data-testid":`${J}__option-list`,attachTo:q,captionKey:t,disabledOptions:c?Z:null,isOpen:z,comparisonKey:p,keepOpen:!0,keyDown:U.keyDown,options:T,specialAction:e,onOptionSelected:Ne,onPositionFlip:ut,hideInlineSearch:!0,optionRole:"option",onOptionListChanged:Pt,filterByTextAndCaptionKey:R,searchDebounce:s,search:U.searchText,tall:E,textKey:N,zeroState:k,loading:V,maxHeightPx:P,maxHeightRem:O,disableOptionsMemoization:$,onSpecialActionSelect:je}))}Object.assign(Di,{props:bw,displayName:"SpsMultiSelect"});const Hu={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,
|
|
@@ -5769,7 +5769,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
5769
5769
|
<br />
|
|
5770
5770
|
{JSON.stringify(formValue)}
|
|
5771
5771
|
</>
|
|
5772
|
-
}`}}}},vw={page:"number",numPages:"number",onPageChange:"(pageNumber: number) => void",disabled:"boolean",unknownPageCount:"boolean",nextPageBtnDisabled:"boolean",onBeforeChange:"(page: number) => boolean | Promise<boolean>"};function ra(e){const{numPages:t=0,onPageChange:n,page:r=1,unsafelyReplaceClassName:a,className:s,"data-testid":l,disabled:c=!1,unknownPageCount:p=!1,nextPageBtnDisabled:m=!1,onBeforeChange:f,...u}=e,{t:h}=o.useContext(He),[S,y]=o.useState(r),[T,C]=o.useState(r);o.useEffect(()=>{C(r),y(r)},[r]);async function E(k){if(f&&!await f(k))return;const V=v.constrain(k,[1,t]);k!==T&&(C(V),y(V),n&&typeof n=="function"&&n(V))}function N(k){y(Number(k.target.value)||"")}const M=G(a||"sps-page-selector",s),I=Sn();return o.createElement("div",{className:M,"data-testid":l,...u},!p&&o.createElement(o.Fragment,null,o.createElement("div",{className:"sps-pagination__input-wrapper","data-testid":`${l}__input`},o.createElement("div",{className:"sps-form-control sps-pagination__input-sizer"},S),o.createElement("label",{htmlFor:I.current,className:"sr-only"},h("design-system:pagination.page",{defaultValue:"Page"})),o.createElement(
|
|
5772
|
+
}`}}}},vw={page:"number",numPages:"number",onPageChange:"(pageNumber: number) => void",disabled:"boolean",unknownPageCount:"boolean",nextPageBtnDisabled:"boolean",onBeforeChange:"(page: number) => boolean | Promise<boolean>"};function ra(e){const{numPages:t=0,onPageChange:n,page:r=1,unsafelyReplaceClassName:a,className:s,"data-testid":l,disabled:c=!1,unknownPageCount:p=!1,nextPageBtnDisabled:m=!1,onBeforeChange:f,...u}=e,{t:h}=o.useContext(He),[S,y]=o.useState(r),[T,C]=o.useState(r);o.useEffect(()=>{C(r),y(r)},[r]);async function E(k){if(f&&!await f(k))return;const V=v.constrain(k,[1,t]);k!==T&&(C(V),y(V),n&&typeof n=="function"&&n(V))}function N(k){y(Number(k.target.value)||"")}const M=G(a||"sps-page-selector",s),I=Sn();return o.createElement("div",{className:M,"data-testid":l,...u},!p&&o.createElement(o.Fragment,null,o.createElement("div",{className:"sps-pagination__input-wrapper","data-testid":`${l}__input`},o.createElement("div",{className:"sps-form-control sps-pagination__input-sizer"},S),o.createElement("label",{htmlFor:I.current,className:"sr-only"},h("design-system:pagination.page",{defaultValue:"Page"})),o.createElement(ro,{onSubmit:()=>E(Number(S))},o.createElement("input",{id:I.current,type:"text",value:S,onInput:N,onChange:()=>{},className:"sps-form-control sps-pagination__input",disabled:c,onBlur:()=>E(Number(S))}))),o.createElement("span",{className:"sps-page-selector__total-pages","data-testid":`${l}_page-count`},Number.isNaN(t)?h("design-system:pagination.ofMany",{defaultValue:"of many"}):h("design-system:pagination.ofPageCount",{pageCount:t,defaultValue:`of ${t}`}))),o.createElement("div",{className:"sps-icon-button-panel","data-testid":`${l}__buttons`},o.createElement("div",{className:G("sps-button","sps-button--icon",(T===1||c)&&"sps-button--disabled")},o.createElement("button",{type:"button",onClick:()=>E(T-1),disabled:T===1||c,title:h("design-system:pagination.prevPage",{defaultValue:"Previous Page"})},o.createElement("i",{className:"sps-icon sps-icon-chevron-left","aria-hidden":"true"}))),o.createElement("div",{className:G("sps-button","sps-button--icon",(T===t||c||m)&&"sps-button--disabled")},o.createElement("button",{type:"button",onClick:()=>E(T+1),disabled:T===t||c||m,title:h("design-system:pagination.nextPage",{defaultValue:"Next Page"})},o.createElement("i",{className:"sps-icon sps-icon-chevron-right","aria-hidden":"true"})))))}Object.assign(ra,{props:vw,displayName:"SpsPageSelector"});const yw={page:"number",pageSize:"number",pageSizeOptions:"Array<number>",totalResults:"number",onPageChange:"(page: number, pageSize: number, indices: [number, number]) => void",disabled:"boolean",unknownPageCount:"boolean",nextPageBtnDisabled:"boolean",resultsOnPage:"number",onBeforeChange:"(page: number, pageSize: number) => boolean | Promise<boolean>"};function Ni(e){const{className:t,onPageChange:n,page:r=1,pageSizeOptions:a=W.DEFAULT_PAGE_SIZE_OPTIONS,pageSize:s=a[0],"data-testid":l,totalResults:c,unsafelyReplaceClassName:p,disabled:m=!1,unknownPageCount:f=!1,nextPageBtnDisabled:u=!1,resultsOnPage:h,onBeforeChange:S,...y}=e,[T,C]=qt({page:r,pageSize:s,numPages:0,indices:[0,0]});function E(P=T.pageSize){return c!==void 0?Math.ceil(c/P):NaN}function N(P=T.page,O=T.pageSize){const $=E(O),J=P===$&&c!==void 0&&c%O||O,L=h||($===0?0:J),Z=(P-1)*O;return $===0?[0,0]:[Z+1,Z+L]}function M(P){const O={page:P,indices:N(P)};return C(O),O}function I(P,O){const $={page:O,pageSize:P,numPages:E(P),indices:N(O,P)};return C($),$}o.useEffect(()=>{C({numPages:E(),indices:N()})},[c,h]),o.useEffect(()=>{r!==T.page&&M(r)},[r]),o.useEffect(()=>{s!==T.pageSize&&I(s,r!==T.page?r:T.page)},[s]);function k(){return typeof c=="number"?c:"many"}function V(P){const O=I(P.target.value,1);n(O.page,O.pageSize,O.indices)}function R(P){const O=M(P);n(O.page,T.pageSize,O.indices)}const w=G(p||"sps-pagination",t);return o.createElement("div",{className:w,"data-testid":l,...y},o.createElement("div",{"data-testid":`${l}__size-selector`,className:"sps-page-size-selector"},"View",o.createElement(Yn,{options:a,onChange:V,notClearable:!0,autoFixWidth:!0,value:T.pageSize,className:"ml-1 mr-1",disabled:m,onBeforeChange:S?P=>S(T.page,Number(P)):void 0}),"Per Page"),f?o.createElement("div",{className:"sps-pagination__details"},`Viewing ${T.indices[0]} - ${T.indices[1]} of many`):o.createElement("div",{className:"sps-pagination__details"},`Viewing ${T.indices[0]} - ${T.indices[1]} of ${k()}`),o.createElement(ra,{numPages:T.numPages,page:T.page,onPageChange:R,disabled:m,unknownPageCount:f,nextPageBtnDisabled:u,onBeforeChange:S?P=>S(P,T.pageSize):void 0}))}Object.assign(Ni,{props:yw,displayName:"SpsPagination"});const Wu={general:{label:"General Usage",description:()=>o.createElement(o.Fragment,null,o.createElement("p",null,"Use the Standard Pagination Bar on a list page (comprised of a Table, Content Rows, or Content Tiles). It should always appear at the bottom of the listed records."),o.createElement("p",null,"Use the Mini Pagination component when a paginated list of results exists inside a smaller Card."))},pagination:{label:"Standard Pagination Bar",description:({Link:e})=>o.createElement(o.Fragment,null,o.createElement("p",null,"The Standard Pagination Bar is comprised of three main sections. The middle section is hidden from view when the width of its container is at the responsive breakpoint of 767 pixels."),o.createElement("ul",null,o.createElement("li",null,o.createElement("p",null,o.createElement("span",{className:"sps-text-semibold"},"Results-per-page Select")," (left): allows the user to adjust the number of records being displayed per page.*")),o.createElement("li",null,o.createElement("p",null,o.createElement("span",{className:"sps-text-semibold"},"Viewing details")," (middle): describes which results are being displayed on the current page.")),o.createElement("li",null,o.createElement("p",null,o.createElement("span",{className:"sps-text-semibold"},"Page Navigator")," (right): allows the user to navigate between pages of results"))),o.createElement("i",null,"*Note: For Tables and Content Rows, per-page options should be 25, 50, and 100. For Content Tiles, per-page options should be 24, 48, and 100."),o.createElement("br",null),o.createElement("p",{className:"mt-2"},"To see an example of the Standard Pagination Bar in context with a Table, view the Table Lists section on the ",o.createElement(e,{to:"/style-and-layout/page-types"},"Page Types")," page.")),examples:{basic:{description:()=>o.createElement("h4",null,"Building the Standard Pagination Bar"),react:v.code`
|
|
5773
5773
|
import { SpsPagination } from "@spscommerce/ds-react";
|
|
5774
5774
|
function Component() {
|
|
5775
5775
|
const [page, setPage] = React.useState(2);
|
|
@@ -6821,7 +6821,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
6821
6821
|
]} className="mr-1">
|
|
6822
6822
|
</SpsSplitButton>
|
|
6823
6823
|
</React.Fragment>
|
|
6824
|
-
`}}}},ww={};function
|
|
6824
|
+
`}}}},ww={};function ao(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=G(a||"sps-content-row__expansion",n);return o.createElement("div",{className:l,...s,"data-testid":`${r}__expansion`},t)}Object.assign(ao,{props:ww,displayName:"SpsSummaryListExpansion"});const Cw={expanded:"boolean",selected:"boolean",onToggle:"(isExpanded: boolean) => void"};function xi(e){const{children:t,className:n,expanded:r,onToggle:a,selected:s,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,[m,f]=qt({isExpanded:r,expandable:!1});o.useEffect(()=>{const E=o.Children.toArray(t).some(N=>o.isValidElement(N)&&N.type===ao);f({expandable:E})},[]);function u(){const E=!m.isExpanded;f({isExpanded:E}),a&&a(E)}function h(E){E.stopPropagation(),u()}function S(E){(E.key==="Enter"||E.key===" "||E.key==="Spacebar")&&(E.preventDefault(),E.stopPropagation(),u())}const y=G(c||"sps-summary-list-row","sps-content-row",m.expandable&&"sps-summary-list-row--expandable",m.isExpanded&&"sps-content-row--expanded",s&&"sps-summary-list-row--selected",n),[T,C]=It(t,[{type:ao}]);return console.warn(["The SpsSummaryListRow component will be replaced by the SpsContentRow component.","All references to it should be replaced before SpsSummaryListRow is removed.","Reach out to the design system help Slack channel if you have any questions!"].join(" ")),o.createElement("div",{className:y,"data-testid":l,...p},o.createElement("div",{className:"sps-content-row__col-group","data-testid":`${l}__col-group`,onClick:h,onKeyDown:S,tabIndex:0},C),T)}Object.assign(xi,{props:Cw,displayName:"SpsSummaryListRow"});const Dw={borderless:"boolean",lean:"boolean",leaner:"boolean",width:"string"};function Mi(e){const{className:t,children:n,borderless:r,lean:a,leaner:s,"data-testid":l,unsafelyReplaceClassName:c,width:p,...m}=e,f=G(c||"sps-content-row__col",a&&"sps-content-row__col--lean",s&&"sps-content-row__col--leaner",r&&"sps-content-row__col--borderless",t);return o.createElement("div",{className:f,style:{width:p},...m,"data-testid":`${l}__col`},n)}Object.assign(Mi,{props:Dw,displayName:"SpsSummaryListColumn"});const qu={basic:{label:"Basic Usage",examples:{basic:{imports:v.code`
|
|
6825
6825
|
import {
|
|
6826
6826
|
SpsSummaryListRow,
|
|
6827
6827
|
SpsSummaryListColumn,
|
|
@@ -7115,7 +7115,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
7115
7115
|
</SpsSummaryListRow>
|
|
7116
7116
|
);
|
|
7117
7117
|
}
|
|
7118
|
-
`}}}},Nw={tasks:"ReactSpsTask[]",taskQueuePosition:"Position",notificationText:"string",tooltipConfig:"{ position: Position, kind: TooltipKind }",onClose:"() => void",onOpen:"() => void",onClearCompleted:"() => void",suppressTooltips:"boolean"};function _i({tasks:e=[],taskQueuePosition:t=W.Position.BOTTOM_RIGHT,notificationText:n,tooltipConfig:r={},onOpen:a,onClose:s,onClearCompleted:l,className:c,"data-testid":p,unsafelyReplaceClassName:m,suppressTooltips:f=!1,...u}){const{t:h}=o.useContext(He),S=!!e.length,[y,T]=o.useState(!1),[C,E]=o.useState(S),N=o.useRef(null),M=o.useRef(null),I=o.useCallback(()=>{T(!1),s&&s()},[]);o.useEffect(()=>{y?window.addEventListener("resize",I):window.removeEventListener("resize",I)},[y]);const k=cr("sps-task-queue-portal"),V=o.useContext(kt),[R]=y?An(M,N,t,{altPosition:t,...V}):[{},!1],w=r.position||W.Position.BOTTOM_RIGHT,P=r.kind||W.TooltipKind.DEFAULT,O=e.filter(H=>H.unread).length,$=e.filter(H=>H.status===W.SpsTaskStatus.IN_PROGRESS).length,J=e.some(H=>H.status===W.SpsTaskStatus.COMPLETED||H.status===W.SpsTaskStatus.ERRORED),L=o.useRef(s);L.current=s;const Z=o.useRef(null),A=()=>{S&&!y?(T(!0),a&&a()):y&&(T(!1),s&&s()),Z.current&&(Z.current.scrollTop=0)},ne=H=>H.status===W.SpsTaskStatus.IN_PROGRESS?W.SpsTaskStatusIcons[H.status]:`sps-icon sps-icon-${W.SpsTaskStatusIcons[H.status]}`;o.useEffect(()=>{y&&!S&&(T(!1),L.current&&L.current())},[y,S]);const Y=o.useRef();o.useEffect(()=>{O>0?(E(!0),Y.current&&window.clearTimeout(Y.current),Y.current=window.setTimeout(()=>{Y.current=void 0,E(!1)},W.TASK_QUEUE_NOTIFICATION_DURATION_MS)):(Y.current&&(window.clearTimeout(Y.current),Y.current=void 0),E(!1))},[O]),o.useEffect(()=>{var q;const H=()=>{T(re=>(re&&L.current&&L.current(),!1))};return(q=document.getElementById("root"))==null||q.addEventListener("click",H),()=>{var re;(re=document.getElementById("root"))==null||re.removeEventListener("click",H)}},[]),o.useEffect(()=>()=>{Y.current&&window.clearTimeout(Y.current)},[]);const U=G(m||"sps-task-queue",y&&"sps-task-queue--open",y&&"z-stratum-dropdown",!S&&"sps-task-queue--no-tasks",c);function ae(H){return(H.actions||[]).map(q=>{if(o.isValidElement(q)){const re=q;if(re.type!==Ue||re.props.kind!==W.ButtonKind.ICON)throw new Error("Task queue task action must be a config object or an SpsButton of kind ICON");return re}else{const re=q;return o.createElement("div",{key:re.icon,className:"sps-button sps-button--icon"},o.createElement("button",{type:"button",title:re.label,disabled:re.disabled,onClick:()=>{re.onClick&&re.onClick(H)}},re.caption,re.icon&&o.createElement("i",{className:`sps-icon sps-icon-${re.icon}`,"aria-hidden":"true"})))}})}return o.createElement("div",{className:U,onClick:H=>{H.nativeEvent.stopImmediatePropagation()},"data-testid":p,...u},o.createElement("button",{type:"button",ref:N,className:"sps-task-queue__button",title:"Task Queue",onClick:A},!!O&&o.createElement("span",{className:"sps-tag sps-tag--info"},O),$?o.createElement("span",{className:"sps-spinner sps-spinner--small"}):o.createElement("i",{className:"sps-icon sps-icon-list","aria-hidden":"true"})),o.createElement(Lt,{for:N,position:w,kind:P,showOn:S?W.TooltipShowTrigger.MANUAL:W.TooltipShowTrigger.MOUSEOVER,isShown:C&&!y?_e.VISIBLE:_e.HIDDEN,hideDelay:Number(S)&&W.TASK_QUEUE_NOTIFICATION_DURATION_MS},!f&&C&&(n||h("design-system:taskQueue.newTask",{defaultValue:"You have a new task in your queue."})),!f&&!C&&!S&&h("design-system:taskQueue.noTasks",{defaultValue:"There are currently no tasks in your queue."})),k(o.createElement("div",{ref:M,className:G("sps-task-queue__task-list",y&&"sps-task-queue__task-list--open","z-stratum-dropdown"),style:R},o.createElement("div",{ref:Z,className:"sps-task-queue__task-list-tasks"},e.map((H,q)=>o.createElement("div",{key:q,className:G("sps-task-queue__task",H.unread&&"sps-task-queue__task--unread")},o.createElement("i",{className:ne(H)}),o.createElement("div",{className:"sps-task-queue__task-description"},o.createElement("div",{className:"sps-task-queue__task-heading"},H.heading),H.subheading&&o.createElement("div",{className:"sps-task-queue__task-subheading",title:H.subheading},H.subheading)),H.actions&&!!H.actions.length&&o.createElement("div",{className:"sps-task-queue__task-actions"},ae(H))))),J&&l&&o.createElement("div",{className:"sps-task-queue__footer"},o.createElement("div",{className:"sps-button sps-button--link"},o.createElement("button",{type:"button",onClick:l},h("design-system:taskQueue.clearCompleted",{defaultValue:"Clear Completed"})))))))}Object.assign(_i,{props:Nw,displayName:"SpsTaskQueue"});const Ju={inProgress:{label:"Task Queue in progress",description:"<p>Info about Task Queue</p>",examples:{inProgress:{react:v.code`
|
|
7118
|
+
`}}}},Nw={tasks:"ReactSpsTask[]",taskQueuePosition:"Position",notificationText:"string",tooltipConfig:"{ position: Position, kind: TooltipKind }",onClose:"() => void",onOpen:"() => void",onClearCompleted:"() => void",suppressTooltips:"boolean"};function _i({tasks:e=[],taskQueuePosition:t=W.Position.BOTTOM_RIGHT,notificationText:n,tooltipConfig:r={},onOpen:a,onClose:s,onClearCompleted:l,className:c,"data-testid":p,unsafelyReplaceClassName:m,suppressTooltips:f=!1,...u}){const{t:h}=o.useContext(He),S=!!e.length,[y,T]=o.useState(!1),[C,E]=o.useState(S),N=o.useRef(null),M=o.useRef(null),I=o.useCallback(()=>{T(!1),s&&s()},[]);o.useEffect(()=>{y?window.addEventListener("resize",I):window.removeEventListener("resize",I)},[y]);const k=cr("sps-task-queue-portal"),V=o.useContext(kt),[R]=y?An(M,N,t,{altPosition:t,...V}):[{},!1],w=r.position||W.Position.BOTTOM_RIGHT,P=r.kind||W.TooltipKind.DEFAULT,O=e.filter(H=>H.unread).length,$=e.filter(H=>H.status===W.SpsTaskStatus.IN_PROGRESS).length,J=e.some(H=>H.status===W.SpsTaskStatus.COMPLETED||H.status===W.SpsTaskStatus.ERRORED),L=o.useRef(s);L.current=s;const Z=o.useRef(null),A=()=>{S&&!y?(T(!0),a&&a()):y&&(T(!1),s&&s()),Z.current&&(Z.current.scrollTop=0)},ne=H=>H.status===W.SpsTaskStatus.IN_PROGRESS?W.SpsTaskStatusIcons[H.status]:`sps-icon sps-icon-${W.SpsTaskStatusIcons[H.status]}`;o.useEffect(()=>{y&&!S&&(T(!1),L.current&&L.current())},[y,S]);const Y=o.useRef();o.useEffect(()=>{O>0?(E(!0),Y.current&&window.clearTimeout(Y.current),Y.current=window.setTimeout(()=>{Y.current=void 0,E(!1)},W.TASK_QUEUE_NOTIFICATION_DURATION_MS)):(Y.current&&(window.clearTimeout(Y.current),Y.current=void 0),E(!1))},[O]),o.useEffect(()=>{var q;const H=()=>{T(re=>(re&&L.current&&L.current(),!1))};return(q=document.getElementById("root"))==null||q.addEventListener("click",H),()=>{var re;(re=document.getElementById("root"))==null||re.removeEventListener("click",H)}},[]),Br({isOpen:y,rootRef:N}),o.useEffect(()=>()=>{Y.current&&window.clearTimeout(Y.current)},[]);const U=G(m||"sps-task-queue",y&&"sps-task-queue--open",y&&"z-stratum-dropdown",!S&&"sps-task-queue--no-tasks",c);function ae(H){return(H.actions||[]).map(q=>{if(o.isValidElement(q)){const re=q;if(re.type!==Ue||re.props.kind!==W.ButtonKind.ICON)throw new Error("Task queue task action must be a config object or an SpsButton of kind ICON");return re}else{const re=q;return o.createElement("div",{key:re.icon,className:"sps-button sps-button--icon"},o.createElement("button",{type:"button",title:re.label,disabled:re.disabled,onClick:()=>{re.onClick&&re.onClick(H)}},re.caption,re.icon&&o.createElement("i",{className:`sps-icon sps-icon-${re.icon}`,"aria-hidden":"true"})))}})}return o.createElement("div",{className:U,onClick:H=>{H.nativeEvent.stopImmediatePropagation()},"data-testid":p,...u},o.createElement("button",{type:"button",ref:N,className:"sps-task-queue__button",title:"Task Queue",onClick:A},!!O&&o.createElement("span",{className:"sps-tag sps-tag--info"},O),$?o.createElement("span",{className:"sps-spinner sps-spinner--small"}):o.createElement("i",{className:"sps-icon sps-icon-list","aria-hidden":"true"})),o.createElement(Lt,{for:N,position:w,kind:P,showOn:S?W.TooltipShowTrigger.MANUAL:W.TooltipShowTrigger.MOUSEOVER,isShown:C&&!y?_e.VISIBLE:_e.HIDDEN,hideDelay:Number(S)&&W.TASK_QUEUE_NOTIFICATION_DURATION_MS},!f&&C&&(n||h("design-system:taskQueue.newTask",{defaultValue:"You have a new task in your queue."})),!f&&!C&&!S&&h("design-system:taskQueue.noTasks",{defaultValue:"There are currently no tasks in your queue."})),k(o.createElement("div",{ref:M,className:G("sps-task-queue__task-list",y&&"sps-task-queue__task-list--open","z-stratum-dropdown"),style:R},o.createElement("div",{ref:Z,className:"sps-task-queue__task-list-tasks"},e.map((H,q)=>o.createElement("div",{key:q,className:G("sps-task-queue__task",H.unread&&"sps-task-queue__task--unread")},o.createElement("i",{className:ne(H)}),o.createElement("div",{className:"sps-task-queue__task-description"},o.createElement("div",{className:"sps-task-queue__task-heading"},H.heading),H.subheading&&o.createElement("div",{className:"sps-task-queue__task-subheading",title:H.subheading},H.subheading)),H.actions&&!!H.actions.length&&o.createElement("div",{className:"sps-task-queue__task-actions"},ae(H))))),J&&l&&o.createElement("div",{className:"sps-task-queue__footer"},o.createElement("div",{className:"sps-button sps-button--link"},o.createElement("button",{type:"button",onClick:l},h("design-system:taskQueue.clearCompleted",{defaultValue:"Clear Completed"})))))))}Object.assign(_i,{props:Nw,displayName:"SpsTaskQueue"});const Ju={inProgress:{label:"Task Queue in progress",description:"<p>Info about Task Queue</p>",examples:{inProgress:{react:v.code`
|
|
7119
7119
|
import { SpsTaskQueue } from "@spscommerce/ds-react";
|
|
7120
7120
|
import { SpsTaskStatus, SpsIcon } from "@spscommerce/ds-shared";
|
|
7121
7121
|
|
|
@@ -8927,7 +8927,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
8927
8927
|
)
|
|
8928
8928
|
}
|
|
8929
8929
|
`}}}};function fm(e,t){const n=new RegExp(`[\\t\r
|
|
8930
|
-
${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter(r=>r!=="")}const Kw={disabled:"boolean",formMeta:"SpsFormFieldMeta<any[]>",icon:"SpsIcon",onChange:"ChangeEventHandler",onEntryChange:"(searchText: string) => void",placeholder:"string",value:"any",createTagOptions:"string[]",isSingleLine:"boolean"};function Gi({className:e,disabled:t,formControl:n,formMeta:r,id:a,onChange:s,onEntryChange:l,placeholder:c,unsafelyReplaceClassName:p,value:m,icon:f,createTagOptions:u=[" ",","],"data-testid":h,isSingleLine:S,...y}){const T=r||n,{wrapperId:C,controlId:E}=bt(a,T),[N,M]=qt({keyDown:null,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{l&&l(N.searchText)},[N.searchText]);const I=o.useRef(null),k=o.useRef(null),V=o.useRef(null);function R(){setTimeout(()=>{var U;(U=k.current)==null||U.focus()},0)}function w(U){M({searchText:""}),T&&(T.setValue(U),T.markAsDirty()),s&&s(new gn({value:U}))}function P(U){const ae=(m||[]).filter((H,q)=>q!==U);w(ae)}function O(U){M({searchText:U.target.value})}function $(U){if(V.current&&V.current.children.length&&typeof U=="number"){const ae=V.current.children[U],H=ae==null?void 0:ae.querySelector(".sps-clickable-tag__icon");H&&H.focus()}}const J=o.useCallback(U=>{M({activeTagIndex:null,searchText:""});const ae=N.searchText.trim(),H=m||[];ae&&H.indexOf(ae)===-1&&w([...H,...fm(ae,u)]),!((U.key==="Tab"||U.key==="Enter")&&!N.searchText)&&U.preventDefault()},[N.searchText,m,fm]);function L(U){J(U)}function Z(U){var ae;if(!t){const H=!U.target.selectionStart&&m&&m.length,q=m?m.length:0;switch(U.key){case"Backspace":if(N.activeTagIndex===q-1){P(N.activeTagIndex),R();return}if(N.activeTagIndex!==null){P(N.activeTagIndex);return}if(H){w(m.slice(0,q-1)),R();return}break;case"Delete":N.activeTagIndex!==null&&(P(N.activeTagIndex),R());break;case"Enter":case"Tab":J(U);break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":U.preventDefault();break;case"Left":case"ArrowLeft":if(H){N.activeTagIndex===null?(M({activeTagIndex:q-1}),$(q-1)):N.activeTagIndex>0&&(M({activeTagIndex:N.activeTagIndex-1}),$(N.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(N.activeTagIndex!==null){N.activeTagIndex===q-1?(M({activeTagIndex:null}),(ae=k.current)==null||ae.focus()):(M({activeTagIndex:N.activeTagIndex+1}),$(N.activeTagIndex+1));return}break}for(const re of u)U.key===re&&J(U);U.persist(),M({keyDown:U})}}function A(U){w([]),U.stopPropagation()}const ne=G(p||"sps-multi-select",t&&"sps-form-control--disabled",e),Y=new Array((m==null?void 0:m.length)||0).fill(0).map((U,ae)=>`${C}_tag-${ae}`);return o.createElement(at,{id:C,className:ne,formControl:n,formMeta:r,ref:I,inputRef:k,focusInputOnClick:!0,onKeyDown:Z,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":Y[N.activeTagIndex||0],"aria-owns":N.optionIds},o.createElement("div",{className:"sps-text-input"},o.createElement("div",{className:S?G("sps-form-control",m&&!t&&"sps-form-control--clearable"&&"sps-multi-select__max-height"):G("sps-form-control",m&&!t&&"sps-form-control--clearable")},f&&o.createElement("i",{className:G("sps-text-input__icon","sps-icon",`sps-icon-${f}`)}),o.createElement("div",{className:"sps-multi-select__tags-and-input",ref:V},Array.isArray(m)&&m.map((U,ae)=>o.createElement(
|
|
8930
|
+
${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter(r=>r!=="")}const Kw={disabled:"boolean",formMeta:"SpsFormFieldMeta<any[]>",icon:"SpsIcon",onChange:"ChangeEventHandler",onEntryChange:"(searchText: string) => void",placeholder:"string",value:"any",createTagOptions:"string[]",isSingleLine:"boolean"};function Gi({className:e,disabled:t,formControl:n,formMeta:r,id:a,onChange:s,onEntryChange:l,placeholder:c,unsafelyReplaceClassName:p,value:m,icon:f,createTagOptions:u=[" ",","],"data-testid":h,isSingleLine:S,...y}){const T=r||n,{wrapperId:C,controlId:E}=bt(a,T),[N,M]=qt({keyDown:null,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{l&&l(N.searchText)},[N.searchText]);const I=o.useRef(null),k=o.useRef(null),V=o.useRef(null);function R(){setTimeout(()=>{var U;(U=k.current)==null||U.focus()},0)}function w(U){M({searchText:""}),T&&(T.setValue(U),T.markAsDirty()),s&&s(new gn({value:U}))}function P(U){const ae=(m||[]).filter((H,q)=>q!==U);w(ae)}function O(U){M({searchText:U.target.value})}function $(U){if(V.current&&V.current.children.length&&typeof U=="number"){const ae=V.current.children[U],H=ae==null?void 0:ae.querySelector(".sps-clickable-tag__icon");H&&H.focus()}}const J=o.useCallback(U=>{M({activeTagIndex:null,searchText:""});const ae=N.searchText.trim(),H=m||[];ae&&H.indexOf(ae)===-1&&w([...H,...fm(ae,u)]),!((U.key==="Tab"||U.key==="Enter")&&!N.searchText)&&U.preventDefault()},[N.searchText,m,fm]);function L(U){J(U)}function Z(U){var ae;if(!t){const H=!U.target.selectionStart&&m&&m.length,q=m?m.length:0;switch(U.key){case"Backspace":if(N.activeTagIndex===q-1){P(N.activeTagIndex),R();return}if(N.activeTagIndex!==null){P(N.activeTagIndex);return}if(H){w(m.slice(0,q-1)),R();return}break;case"Delete":N.activeTagIndex!==null&&(P(N.activeTagIndex),R());break;case"Enter":case"Tab":J(U);break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":U.preventDefault();break;case"Left":case"ArrowLeft":if(H){N.activeTagIndex===null?(M({activeTagIndex:q-1}),$(q-1)):N.activeTagIndex>0&&(M({activeTagIndex:N.activeTagIndex-1}),$(N.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(N.activeTagIndex!==null){N.activeTagIndex===q-1?(M({activeTagIndex:null}),(ae=k.current)==null||ae.focus()):(M({activeTagIndex:N.activeTagIndex+1}),$(N.activeTagIndex+1));return}break}for(const re of u)U.key===re&&J(U);U.persist(),M({keyDown:U})}}function A(U){w([]),U.stopPropagation()}const ne=G(p||"sps-multi-select",t&&"sps-form-control--disabled",e),Y=new Array((m==null?void 0:m.length)||0).fill(0).map((U,ae)=>`${C}_tag-${ae}`);return o.createElement(at,{id:C,className:ne,formControl:n,formMeta:r,ref:I,inputRef:k,focusInputOnClick:!0,onKeyDown:Z,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":Y[N.activeTagIndex||0],"aria-owns":N.optionIds},o.createElement("div",{className:"sps-text-input"},o.createElement("div",{className:S?G("sps-form-control",m&&!t&&"sps-form-control--clearable"&&"sps-multi-select__max-height"):G("sps-form-control",m&&!t&&"sps-form-control--clearable")},f&&o.createElement("i",{className:G("sps-text-input__icon","sps-icon",`sps-icon-${f}`)}),o.createElement("div",{className:"sps-multi-select__tags-and-input",ref:V},Array.isArray(m)&&m.map((U,ae)=>o.createElement(Ar,{id:Y[ae],role:"option",disabled:t,"aria-selected":"true",key:Y[ae],onRemove:()=>P(ae)},o.createElement("span",null,U))),o.createElement("input",{type:"text",ref:k,"data-testid":`${h}__multi-value-text-input`,value:N.searchText,className:"sps-text-input__input",placeholder:N.searchText.length===0&&(!m||m.length===0)?c:void 0,id:E,onBlur:L,onChange:O,onKeyDown:Z,disabled:t,role:"listbox","aria-multiselectable":"true","aria-owns":Y.join(" "),...y})),m&&m.length!==0&&!t?o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:U=>A(U)}):null)))}Object.assign(Gi,{props:Kw,displayName:"SpsMultiValueTextInput"});const hm={general:{label:"General Usage",description:()=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Coming soon"))},basic:{label:"Basic Usage",examples:{basic:{react:v.code`
|
|
8931
8931
|
import { SpsMultiValueTextInput, SpsLabel, useSpsForm } from "@spscommerce/ds-react";
|
|
8932
8932
|
function DemoComponent() {
|
|
8933
8933
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
@@ -9137,7 +9137,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9137
9137
|
</>
|
|
9138
9138
|
);
|
|
9139
9139
|
}
|
|
9140
|
-
`}}}},Ww={Autocomplete:{components:[Jt],examples:fc},Checkboxes:{components:[Fn],examples:hc},"Clickable Tags":{components:[Br],examples:Sc},"Column Chooser":{components:[ci,zo],examples:Gp},"Conditional Fields":{description:()=>o.createElement("p",null,"A conditional field is one that is only available when a certain option is selected amongst a set of checkboxes or radio buttons."),components:[Wi],examples:mm},"Content Rows":{components:[di,Gn,jo],examples:Yp},"Content Sections":{components:[bi],examples:bu},"Date Pickers":{components:[pi],examples:Xp},"Date Range Pickers":{components:[mi],examples:tu},"Date Time Range Pickers":{components:[fi],examples:su},Datetime:{components:[Si],examples:lu},"Time Input":{components:[Yi],examples:gm},"Description Lists":{description:()=>o.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[Zo,Xo,ea],examples:Su},Dropdown:{components:[zn,gi],examples:gu},"Filter Panel":{components:[Vi,$i,Ki,Hi],examples:um},Form:{components:[no],examples:Wp},Incrementor:{components:[vi],examples:vu},Label:{description:()=>o.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[yi],examples:yu},"List Action Bar":{description:()=>o.createElement("p",null,"The List Action Bar contains the action buttons relevant to selected items from a Table List, Row List, or Card List. The List Action Bar is only visible when one or more list items have been selected and appears anchored to the bottom of the page above all other content."),components:[Ti],examples:Fu},"Micro Block":{components:[Ei],examples:Vu},Modals:{description:()=>o.createElement("p",null,"Modals are overlays on a page that focus a user’s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),components:[wi,na],examples:Ku},"Multi Select":{description:()=>o.createElement("p",null,"Multi-Selects consist of a Label and a dropdown menu from which a user selects one or more values from a list of pre-defined options."),components:[Di],examples:Hu},"Multi Value Text Input":{description:()=>o.createElement("p",null,"To be determined."),components:[Gi],examples:hm},Pagination:{description:()=>o.createElement("p",null,"The Pagination component allows users to navigate lists of records and control the number of records displayed on each page. The records can span across multiple pages, or within sections of a page."),components:[Ni,ra],examples:Wu},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[ki],examples:Gu},Selects:{description:"Selects consist off a Label and a dropdown menu from which a user selects a value from a list of pre-defined options.",components:[Yn],examples:nu},"Side Navigation":{description:"Side Navigations are used to provide quick access to a series of related pages or content. It can be used to navigate between different page views, or as an anchor-style menu to scroll to specific content on the same page.",components:[Uu],examples:zu},"Split Button":{components:[Ii],examples:ju},"Summary List Row":{components:[xi,Mi,oo],examples:qu},Tables:{description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("div",{className:"sps-body-14"},"Tables (along with ",o.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",o.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),o.createElement("br",null),o.createElement("div",{className:"sps-body-14"},"Tables are the ideal solution for displaying tabular data, especially when the listed records contain a considerable amount of data points. While tables are primarily used to display an extensive list of records, often in a paginated format, they can also be used to display smaller sets of tabular data in any context.")),components:[jn,Cn,pe,wn,ot,Ge],examples:Au},"Task Queue":{components:[_i],examples:Ju},"Text Inputs":{description:()=>o.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[aa],examples:Zu},"Text Areas":{description:()=>o.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[Li],examples:Xu},Toggles:{description:()=>o.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[Oi],examples:em},Tooltips:{components:[Lt,Pi],examples:tm},Wizard:{components:[Bi,Ai],examples:om},Workflow:{components:[sa,ia,la,ca],examples:pm,notices:[Rw]},"Slide In Panels":{description:"",components:[Ci],examples:$u}},bm=new WeakMap;function da(e,t,n){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${bm.get(e)}-${n}-${t}`):""}const ao=typeof document<"u"?x.useLayoutEffect:()=>{};function yr(e){const t=x.useRef(null);return ao(()=>{t.current=e},[e]),x.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const pa={prefix:String(Math.round(Math.random()*1e10)),current:0},vm=x.createContext(pa),Gw=x.createContext(!1);let Yw=!!(typeof window<"u"&&window.document&&window.document.createElement),Ui=new WeakMap;function Uw(e=!1){let t=x.useContext(vm),n=x.useRef(null);if(n.current===null&&!e){var r,a;let s=(a=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let l=Ui.get(s);l==null?Ui.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==l.state&&(t.current=l.id,Ui.delete(s))}n.current=++t.current}return n.current}function zw(e){let t=x.useContext(vm);t===pa&&!Yw&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Uw(!!e),r=t===pa&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function jw(e){let t=x.useId(),[n]=x.useState(ym()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${pa.prefix}`;return e||`${r}-${t}`}const qw=typeof x.useId=="function"?jw:zw;function Jw(){return!1}function Zw(){return!0}function Xw(e){return()=>{}}function ym(){return typeof x.useSyncExternalStore=="function"?x.useSyncExternalStore(Xw,Jw,Zw):x.useContext(Gw)}let Qw=!!(typeof window<"u"&&window.document&&window.document.createElement),Dn=new Map;function Tm(e){let[t,n]=x.useState(e),r=x.useRef(null),a=qw(t),s=x.useCallback(l=>{r.current=l},[]);return Qw&&(Dn.has(a)&&!Dn.get(a).includes(s)?Dn.set(a,[...Dn.get(a),s]):Dn.set(a,[s])),ao(()=>{let l=a;return()=>{Dn.delete(l)}},[a]),x.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),a}function eC(e,t){if(e===t)return e;let n=Dn.get(e);if(n)return n.forEach(a=>a(t)),t;let r=Dn.get(t);return r?(r.forEach(a=>a(e)),e):t}function Em(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Nt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},qn=e=>e&&"window"in e&&e.window===e?e:Nt(e).defaultView||window;function wm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=wm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=wm(e))&&(r&&(r+=" "),r+=t);return r}function Nn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let a in r){let s=t[a],l=r[a];typeof s=="function"&&typeof l=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Em(s,l):(a==="className"||a==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[a]=tC(s,l):a==="id"&&s&&l?t.id=eC(s,l):t[a]=l!==void 0?l:s}}return t}const nC=new Set(["id"]),rC=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),oC=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),aC=/^(data-.*)$/;function sC(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,s={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(nC.has(l)||n&&rC.has(l)||r&&oC.has(l)||a!=null&&a.has(l)||aC.test(l))&&(s[l]=e[l]);return s}function nn(e){if(iC())e.focus({preventScroll:!0});else{let t=lC(e);e.focus(),cC(t)}}let ua=null;function iC(){if(ua==null){ua=!1;try{document.createElement("div").focus({get preventScroll(){return ua=!0,!0}})}catch{}}return ua}function lC(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function cC(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function ma(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function zi(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function rn(e){let t=null;return()=>(t==null&&(t=e()),t)}const Jn=rn(function(){return zi(/^Mac/i)}),dC=rn(function(){return zi(/^iPhone/i)}),Cm=rn(function(){return zi(/^iPad/i)||Jn()&&navigator.maxTouchPoints>1}),ji=rn(function(){return dC()||Cm()}),pC=rn(function(){return Jn()||ji()}),uC=rn(function(){return ma(/AppleWebKit/i)&&!mC()}),mC=rn(function(){return ma(/Chrome/i)}),Dm=rn(function(){return ma(/Android/i)}),fC=rn(function(){return ma(/Firefox/i)}),hC=x.createContext({isNative:!0,open:gC,useHref:e=>e});function qi(){return x.useContext(hC)}function Zn(e,t,n=!0){var r,a;let{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}=t;fC()&&(!((a=window.event)===null||a===void 0||(r=a.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Jn()?s=!0:l=!0);let m=uC()&&Jn()&&!Cm()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}):new MouseEvent("click",{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p,bubbles:!0,cancelable:!0});Zn.isOpening=n,nn(e),e.dispatchEvent(m),Zn.isOpening=!1}Zn.isOpening=!1;function SC(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function gC(e,t){SC(e,n=>Zn(n,t))}function bC(e){let t=qi();var n;const r=t.useHref((n=e==null?void 0:e.href)!==null&&n!==void 0?n:"");return{href:e!=null&&e.href?r:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}let Tr=new Map,Ji=new Set;function Nm(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);a||(a=new Set,Tr.set(r.target,a),r.target.addEventListener("transitioncancel",n,{once:!0})),a.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),Tr.delete(r.target)),Tr.size===0)){for(let s of Ji)s();Ji.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Nm():document.addEventListener("DOMContentLoaded",Nm));function km(e){requestAnimationFrame(()=>{Tr.size===0?e():Ji.add(e)})}function Im(){let e=x.useRef(new Map),t=x.useCallback((a,s,l,c)=>{let p=c!=null&&c.once?(...m)=>{e.current.delete(l),l(...m)}:l;e.current.set(l,{type:s,eventTarget:a,fn:p,options:c}),a.addEventListener(s,l,c)},[]),n=x.useCallback((a,s,l,c)=>{var p;let m=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;a.removeEventListener(s,m,c),e.current.delete(l)},[]),r=x.useCallback(()=>{e.current.forEach((a,s)=>{n(a.eventTarget,a.type,s,a.options)})},[n]);return x.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function xm(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Tm(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!r&&!a&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function vC(e,t){ao(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function yC(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function TC(e,t){const n=[];for(;e&&e!==document.documentElement;)yC(e,t)&&n.push(e),e=e.parentElement;return n}let EC=0;const Zi=new Map;function wC(e){let[t,n]=x.useState();return ao(()=>{if(!e)return;let r=Zi.get(e);if(r)n(r.element.id);else{let a=`react-aria-description-${EC++}`;n(a);let s=document.createElement("div");s.id=a,s.style.display="none",s.textContent=e,document.body.appendChild(s),r={refCount:0,element:s},Zi.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Zi.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Mm(e,t,n,r){let a=yr(n),s=n==null;x.useEffect(()=>{if(s||!e.current)return;let l=e.current;return l.addEventListener(t,a,r),()=>{l.removeEventListener(t,a,r)}},[e,t,r,s,a])}function _m(e,t){let n=Lm(e,t,"left"),r=Lm(e,t,"top"),a=t.offsetWidth,s=t.offsetHeight,l=e.scrollLeft,c=e.scrollTop,{borderTopWidth:p,borderLeftWidth:m}=getComputedStyle(e),f=e.scrollLeft+parseInt(m,10),u=e.scrollTop+parseInt(p,10),h=f+e.clientWidth,S=u+e.clientHeight;n<=l?l=n-parseInt(m,10):n+a>h&&(l+=n+a-h),r<=u?c=r-parseInt(p,10):r+s>S&&(c+=r+s-S),e.scrollLeft=l,e.scrollTop=c}function Lm(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[r];break}t=t.offsetParent}return a}function Om(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=TC(e);for(let m of p)_m(m,e)}else{var n;let{left:p,top:m}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:f,top:u}=e.getBoundingClientRect();if(Math.abs(p-f)>1||Math.abs(m-u)>1){var r,a,s;t==null||(a=t.containingElement)===null||a===void 0||(r=a.scrollIntoView)===null||r===void 0||r.call(a,{block:"center",inline:"center"}),(s=e.scrollIntoView)===null||s===void 0||s.call(e,{block:"nearest"})}}}}function Xi(e){return e.mozInputSource===0&&e.isTrusted?!0:Dm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function CC(e){return!Dm()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Pm(e,t,n){let[r,a]=x.useState(e||t),s=x.useRef(e!==void 0),l=e!==void 0;x.useEffect(()=>{let m=s.current;m!==l&&console.warn(`WARN: A component changed from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?e:r,p=x.useCallback((m,...f)=>{let u=(h,...S)=>{n&&(Object.is(c,h)||n(h,...S)),l||(c=h)};typeof m=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((S,...y)=>{let T=m(l?c:S,...y);return u(T,...f),l?S:T})):(l||a(m),u(m,...f))},[l,c,n]);return[c,p]}function Qi(e){return pC()?e.altKey:e.ctrlKey}function Er(e){return Jn()?e.metaKey:e.ctrlKey}const DC=1e3;function NC(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,a=x.useRef({search:"",timeout:null}).current,s=l=>{let c=kC(l.key);if(!c||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))return;c===" "&&a.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),a.search+=c;let p=t.getKeyForSearch(a.search,n.focusedKey);p==null&&(p=t.getKeyForSearch(a.search)),p!=null&&(n.setFocusedKey(p),r&&r(p)),clearTimeout(a.timeout),a.timeout=setTimeout(()=>{a.search=""},DC)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:null}}}function kC(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}let wr="default",el="",fa=new WeakMap;function Rm(e){if(ji()){if(wr==="default"){const t=Nt(e);el=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}wr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(fa.set(e,e.style.userSelect),e.style.userSelect="none")}function ha(e){if(ji()){if(wr!=="disabled")return;wr="restoring",setTimeout(()=>{km(()=>{if(wr==="restoring"){const t=Nt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=el||""),el="",wr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&fa.has(e)){let t=fa.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),fa.delete(e)}}const Bm=x.createContext({register:()=>{}});Bm.displayName="PressResponderContext";function IC(e,t){return t.get?t.get.call(e):t.value}function Am(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function xC(e,t){var n=Am(e,t,"get");return IC(e,n)}function MC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _C(e,t,n){MC(e,t),t.set(e,n)}function LC(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Fm(e,t,n){var r=Am(e,t,"set");return LC(e,r,n),n}function OC(e){let t=x.useContext(Bm);if(t){let{register:n,...r}=t;e=Nn(r,e),n()}return vC(t,e.ref),e}var Sa=new WeakMap;class ga{continuePropagation(){Fm(this,Sa,!1)}get shouldStopPropagation(){return xC(this,Sa)}constructor(t,n,r,a){_C(this,Sa,{writable:!0,value:void 0}),Fm(this,Sa,!0);var s;let l=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:r.currentTarget;const c=l==null?void 0:l.getBoundingClientRect();let p,m=0,f,u=null;r.clientX!=null&&r.clientY!=null&&(f=r.clientX,u=r.clientY),c&&(f!=null&&u!=null?(p=f-c.left,m=u-c.top):(p=c.width/2,m=c.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=p,this.y=m}}const Vm=Symbol("linkClicked");function $m(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:s,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:f,ref:u,...h}=OC(e),[S,y]=x.useState(!1),T=x.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:E}=Im(),N=yr((w,P)=>{let O=T.current;if(l||O.didFirePressStart)return!1;let $=!0;if(O.isTriggeringEvent=!0,r){let J=new ga("pressstart",P,w);r(J),$=J.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,y(!0),$}),M=yr((w,P,O=!0)=>{let $=T.current;if(!$.didFirePressStart)return!1;$.ignoreClickAfterPress=!0,$.didFirePressStart=!1,$.isTriggeringEvent=!0;let J=!0;if(a){let L=new ga("pressend",P,w);a(L),J=L.shouldStopPropagation}if(n&&n(!1),y(!1),t&&O&&!l){let L=new ga("press",P,w);t(L),J&&(J=L.shouldStopPropagation)}return $.isTriggeringEvent=!1,J}),I=yr((w,P)=>{let O=T.current;if(l)return!1;if(s){O.isTriggeringEvent=!0;let $=new ga("pressup",P,w);return s($),O.isTriggeringEvent=!1,$.shouldStopPropagation}return!0}),k=yr(w=>{let P=T.current;P.isPressed&&P.target&&(P.isOverTarget&&P.pointerType!=null&&M(on(P.target,w),P.pointerType,!1),P.isPressed=!1,P.isOverTarget=!1,P.activePointerId=null,P.pointerType=null,E(),f||ha(P.target))}),V=yr(w=>{m&&k(w)}),R=x.useMemo(()=>{let w=T.current,P={onKeyDown($){if(nl($.nativeEvent,$.currentTarget)&&$.currentTarget.contains($.target)){var J;Wm($.target,$.key)&&$.preventDefault();let L=!0;if(!w.isPressed&&!$.repeat){w.target=$.currentTarget,w.isPressed=!0,L=N($,"keyboard");let Z=$.currentTarget,A=ne=>{nl(ne,Z)&&!ne.repeat&&Z.contains(ne.target)&&w.target&&I(on(w.target,ne),"keyboard")};C(Nt($.currentTarget),"keyup",Em(A,O),!0)}L&&$.stopPropagation(),$.metaKey&&Jn()&&((J=w.metaKeyEvents)===null||J===void 0||J.set($.key,$.nativeEvent))}else $.key==="Meta"&&(w.metaKeyEvents=new Map)},onClick($){if(!($&&!$.currentTarget.contains($.target))&&$&&$.button===0&&!w.isTriggeringEvent&&!Zn.isOpening){let J=!0;if(l&&$.preventDefault(),!w.ignoreClickAfterPress&&!w.ignoreEmulatedMouseEvents&&!w.isPressed&&(w.pointerType==="virtual"||Xi($.nativeEvent))){!l&&!p&&nn($.currentTarget);let L=N($,"virtual"),Z=I($,"virtual"),A=M($,"virtual");J=L&&Z&&A}w.ignoreEmulatedMouseEvents=!1,w.ignoreClickAfterPress=!1,J&&$.stopPropagation()}}},O=$=>{var J;if(w.isPressed&&w.target&&nl($,w.target)){var L;Wm($.target,$.key)&&$.preventDefault();let A=$.target;M(on(w.target,$),"keyboard",w.target.contains(A)),E(),$.key!=="Enter"&&tl(w.target)&&w.target.contains(A)&&!$[Vm]&&($[Vm]=!0,Zn(w.target,$,!1)),w.isPressed=!1,(L=w.metaKeyEvents)===null||L===void 0||L.delete($.key)}else if($.key==="Meta"&&(!((J=w.metaKeyEvents)===null||J===void 0)&&J.size)){var Z;let A=w.metaKeyEvents;w.metaKeyEvents=void 0;for(let ne of A.values())(Z=w.target)===null||Z===void 0||Z.dispatchEvent(new KeyboardEvent("keyup",ne))}};if(typeof PointerEvent<"u"){P.onPointerDown=A=>{if(A.button!==0||!A.currentTarget.contains(A.target))return;if(CC(A.nativeEvent)){w.pointerType="virtual";return}rl(A.currentTarget)&&A.preventDefault(),w.pointerType=A.pointerType;let ne=!0;w.isPressed||(w.isPressed=!0,w.isOverTarget=!0,w.activePointerId=A.pointerId,w.target=A.currentTarget,!l&&!p&&nn(A.currentTarget),f||Rm(w.target),ne=N(A,w.pointerType),C(Nt(A.currentTarget),"pointermove",$,!1),C(Nt(A.currentTarget),"pointerup",J,!1),C(Nt(A.currentTarget),"pointercancel",Z,!1)),ne&&A.stopPropagation()},P.onMouseDown=A=>{A.currentTarget.contains(A.target)&&A.button===0&&(rl(A.currentTarget)&&A.preventDefault(),A.stopPropagation())},P.onPointerUp=A=>{!A.currentTarget.contains(A.target)||w.pointerType==="virtual"||A.button===0&&Cr(A,A.currentTarget)&&I(A,w.pointerType||A.pointerType)};let $=A=>{A.pointerId===w.activePointerId&&(w.target&&Cr(A,w.target)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,N(on(w.target,A),w.pointerType)):w.target&&w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,M(on(w.target,A),w.pointerType,!1),V(A)))},J=A=>{A.pointerId===w.activePointerId&&w.isPressed&&A.button===0&&w.target&&(Cr(A,w.target)&&w.pointerType!=null?M(on(w.target,A),w.pointerType):w.isOverTarget&&w.pointerType!=null&&M(on(w.target,A),w.pointerType,!1),w.isPressed=!1,w.isOverTarget=!1,w.activePointerId=null,w.pointerType=null,E(),f||ha(w.target),"ontouchend"in w.target&&A.pointerType!=="mouse"&&C(w.target,"touchend",L,{once:!0}))},L=A=>{Hm(A.target)&&A.preventDefault()},Z=A=>{k(A)};P.onDragStart=A=>{A.currentTarget.contains(A.target)&&k(A)}}else{P.onMouseDown=L=>{if(L.button!==0||!L.currentTarget.contains(L.target))return;if(rl(L.currentTarget)&&L.preventDefault(),w.ignoreEmulatedMouseEvents){L.stopPropagation();return}w.isPressed=!0,w.isOverTarget=!0,w.target=L.currentTarget,w.pointerType=Xi(L.nativeEvent)?"virtual":"mouse",!l&&!p&&nn(L.currentTarget),N(L,w.pointerType)&&L.stopPropagation(),C(Nt(L.currentTarget),"mouseup",$,!1)},P.onMouseEnter=L=>{if(!L.currentTarget.contains(L.target))return;let Z=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!0,Z=N(L,w.pointerType)),Z&&L.stopPropagation()},P.onMouseLeave=L=>{if(!L.currentTarget.contains(L.target))return;let Z=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!1,Z=M(L,w.pointerType,!1),V(L)),Z&&L.stopPropagation()},P.onMouseUp=L=>{L.currentTarget.contains(L.target)&&!w.ignoreEmulatedMouseEvents&&L.button===0&&I(L,w.pointerType||"mouse")};let $=L=>{if(L.button===0){if(w.isPressed=!1,E(),w.ignoreEmulatedMouseEvents){w.ignoreEmulatedMouseEvents=!1;return}w.target&&Cr(L,w.target)&&w.pointerType!=null?M(on(w.target,L),w.pointerType):w.target&&w.isOverTarget&&w.pointerType!=null&&M(on(w.target,L),w.pointerType,!1),w.isOverTarget=!1}};P.onTouchStart=L=>{if(!L.currentTarget.contains(L.target))return;let Z=PC(L.nativeEvent);if(!Z)return;w.activePointerId=Z.identifier,w.ignoreEmulatedMouseEvents=!0,w.isOverTarget=!0,w.isPressed=!0,w.target=L.currentTarget,w.pointerType="touch",!l&&!p&&nn(L.currentTarget),f||Rm(w.target),N(kn(w.target,L),w.pointerType)&&L.stopPropagation(),C(qn(L.currentTarget),"scroll",J,!0)},P.onTouchMove=L=>{if(!L.currentTarget.contains(L.target))return;if(!w.isPressed){L.stopPropagation();return}let Z=Km(L.nativeEvent,w.activePointerId),A=!0;Z&&Cr(Z,L.currentTarget)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,A=N(kn(w.target,L),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,A=M(kn(w.target,L),w.pointerType,!1),V(kn(w.target,L))),A&&L.stopPropagation()},P.onTouchEnd=L=>{if(!L.currentTarget.contains(L.target))return;if(!w.isPressed){L.stopPropagation();return}let Z=Km(L.nativeEvent,w.activePointerId),A=!0;Z&&Cr(Z,L.currentTarget)&&w.pointerType!=null?(I(kn(w.target,L),w.pointerType),A=M(kn(w.target,L),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(A=M(kn(w.target,L),w.pointerType,!1)),A&&L.stopPropagation(),w.isPressed=!1,w.activePointerId=null,w.isOverTarget=!1,w.ignoreEmulatedMouseEvents=!0,w.target&&!f&&ha(w.target),E()},P.onTouchCancel=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),w.isPressed&&k(kn(w.target,L)))};let J=L=>{w.isPressed&&L.target.contains(w.target)&&k({currentTarget:w.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};P.onDragStart=L=>{L.currentTarget.contains(L.target)&&k(L)}}return P},[C,l,p,E,f,k,V,M,N,I]);return x.useEffect(()=>()=>{var w;f||ha((w=T.current.target)!==null&&w!==void 0?w:void 0)},[f]),{isPressed:c||S,pressProps:Nn(h,R)}}function tl(e){return e.tagName==="A"&&e.hasAttribute("href")}function nl(e,t){const{key:n,code:r}=e,a=t,s=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof qn(a).HTMLInputElement&&!Gm(a,n)||a instanceof qn(a).HTMLTextAreaElement||a.isContentEditable)&&!((s==="link"||!s&&tl(a))&&n!=="Enter")}function PC(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function Km(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const a=n[r];if(a.identifier===t)return a}return null}function kn(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function on(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function RC(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function BC(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Cr(e,t){let n=t.getBoundingClientRect(),r=RC(e);return BC(n,r)}function rl(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Hm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!tl(e)}function Wm(e,t){return e instanceof HTMLInputElement?!Gm(e,t):Hm(e)}const AC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Gm(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":AC.has(e.type)}let so=null,FC=new Set,io=new Map,Xn=!1,ol=!1;function al(e,t){for(let n of FC)n(e,t)}function VC(e){return!(e.metaKey||!Jn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ba(e){Xn=!0,VC(e)&&(so="keyboard",al("keyboard",e))}function Ot(e){so="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Xn=!0,al("pointer",e))}function Ym(e){Xi(e)&&(Xn=!0,so="virtual")}function Um(e){e.target===window||e.target===document||(!Xn&&!ol&&(so="virtual",al("virtual",e)),Xn=!1,ol=!1)}function zm(){Xn=!1,ol=!0}function jm(e){if(typeof window>"u"||io.get(qn(e)))return;const t=qn(e),n=Nt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Xn=!0,r.apply(this,arguments)},n.addEventListener("keydown",ba,!0),n.addEventListener("keyup",ba,!0),n.addEventListener("click",Ym,!0),t.addEventListener("focus",Um,!0),t.addEventListener("blur",zm,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ot,!0),n.addEventListener("pointermove",Ot,!0),n.addEventListener("pointerup",Ot,!0)):(n.addEventListener("mousedown",Ot,!0),n.addEventListener("mousemove",Ot,!0),n.addEventListener("mouseup",Ot,!0)),t.addEventListener("beforeunload",()=>{qm(e)},{once:!0}),io.set(t,{focus:r})}const qm=(e,t)=>{const n=qn(e),r=Nt(e);t&&r.removeEventListener("DOMContentLoaded",t),io.has(n)&&(n.HTMLElement.prototype.focus=io.get(n).focus,r.removeEventListener("keydown",ba,!0),r.removeEventListener("keyup",ba,!0),r.removeEventListener("click",Ym,!0),n.removeEventListener("focus",Um,!0),n.removeEventListener("blur",zm,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ot,!0),r.removeEventListener("pointermove",Ot,!0),r.removeEventListener("pointerup",Ot,!0)):(r.removeEventListener("mousedown",Ot,!0),r.removeEventListener("mousemove",Ot,!0),r.removeEventListener("mouseup",Ot,!0)),io.delete(n))};function $C(e){const t=Nt(e);let n;return t.readyState!=="loading"?jm(e):(n=()=>{jm(e)},t.addEventListener("DOMContentLoaded",n)),()=>qm(e,n)}typeof document<"u"&&$C();function sl(){return so}const KC=500;function HC(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:a,threshold:s=KC,accessibilityDescription:l}=e;const c=x.useRef(void 0);let{addGlobalListener:p,removeGlobalListener:m}=Im(),{pressProps:f}=$m({isDisabled:t,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),c.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...h,type:"longpress"}),c.current=void 0},s),h.pointerType==="touch")){let S=y=>{y.preventDefault()};p(h.target,"contextmenu",S,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{m(h.target,"contextmenu",S)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=wC(a&&!t?l:void 0);return{longPressProps:Nn(f,u)}}function il(e){const t=Nt(e);if(sl()==="virtual"){let n=t.activeElement;km(()=>{t.activeElement===n&&e.isConnected&&nn(e)})}else nn(e)}function WC(e){const t=qn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a=n!=="none"&&r!=="hidden"&&r!=="collapse";if(a){const{getComputedStyle:s}=e.ownerDocument.defaultView;let{display:l,visibility:c}=s(e);a=l!=="none"&&c!=="hidden"&&c!=="collapse"}return a}function GC(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Jm(e,t){return e.nodeName!=="#comment"&&WC(e)&&GC(e,t)&&(!e.parentElement||Jm(e.parentElement,e))}const ll=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],YC=ll.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ll.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const UC=ll.join(':not([hidden]):not([tabindex="-1"]),');function Zm(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Xm(e,t,n){let r=t!=null&&t.tabbable?UC:YC,a=Nt(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&Jm(s)&&(!n||Zm(s,n))&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class cl{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let a=this.fastMap.get(n??null);if(!a)return;let s=new Qm({scopeRef:t});a.addChild(s),s.parent=a,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Zm(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let a=n.children;r&&(r.removeChild(n),a.size>0&&a.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new cl;var r;for(let a of this.traverse())n.addTreeNode(a.scopeRef,(r=(t=a.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,a.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Qm({scopeRef:null}),this.fastMap.set(null,this.root)}}class Qm{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new cl;function zC(e,t){let n=t==null?void 0:t.isDisabled,[r,a]=x.useState(!1);return ao(()=>{if(e!=null&&e.current&&!n){let s=()=>{if(e.current){let c=Xm(e.current,{tabbable:!0});a(!!c.nextNode())}};s();let l=new MutationObserver(s);return l.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{l.disconnect()}}}),n?!1:r}const jC=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),qC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function JC(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return jC.has(n.script)}let t=e.split("-")[0];return qC.has(t)}const ZC=Symbol.for("react-aria.i18n.locale");function ef(){let e=typeof window<"u"&&window[ZC]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:JC(e)?"rtl":"ltr"}}let dl=ef(),lo=new Set;function tf(){dl=ef();for(let e of lo)e(dl)}function XC(){let e=ym(),[t,n]=x.useState(dl);return x.useEffect(()=>(lo.size===0&&window.addEventListener("languagechange",tf),lo.add(n),()=>{lo.delete(n),lo.size===0&&window.removeEventListener("languagechange",tf)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const QC=x.createContext(null);function nf(){let e=XC();return x.useContext(QC)||e}function eD(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:a=!1,shouldFocusWrap:s=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,selectOnFocus:p=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:f,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:S=r,linkBehavior:y="action"}=e,{direction:T}=nf(),C=qi(),E=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const $=(j,B)=>{if(j!=null){if(t.isLink(j)&&y==="selection"&&p&&!Qi(O)){bo.flushSync(()=>{t.setFocusedKey(j,B)});let z=S.current.querySelector(`[data-key="${CSS.escape(j.toString())}"]`),Q=t.getItemProps(j);C.open(z,O,Q.href,Q.routerOptions);return}if(t.setFocusedKey(j,B),t.isLink(j)&&y==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(j):p&&!Qi(O)&&t.replaceSelection(j)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var J,L,Z;let j=t.focusedKey!=null?(J=n.getKeyBelow)===null||J===void 0?void 0:J.call(n,t.focusedKey):(L=n.getFirstKey)===null||L===void 0?void 0:L.call(n);j==null&&s&&(j=(Z=n.getFirstKey)===null||Z===void 0?void 0:Z.call(n,t.focusedKey)),j!=null&&(O.preventDefault(),$(j))}break;case"ArrowUp":if(n.getKeyAbove){var A,ne,Y;let j=t.focusedKey!=null?(A=n.getKeyAbove)===null||A===void 0?void 0:A.call(n,t.focusedKey):(ne=n.getLastKey)===null||ne===void 0?void 0:ne.call(n);j==null&&s&&(j=(Y=n.getLastKey)===null||Y===void 0?void 0:Y.call(n,t.focusedKey)),j!=null&&(O.preventDefault(),$(j))}break;case"ArrowLeft":if(n.getKeyLeftOf){var U,ae,H;let j=(U=n.getKeyLeftOf)===null||U===void 0?void 0:U.call(n,t.focusedKey);j==null&&s&&(j=T==="rtl"?(ae=n.getFirstKey)===null||ae===void 0?void 0:ae.call(n,t.focusedKey):(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,t.focusedKey)),j!=null&&(O.preventDefault(),$(j,T==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var q,re,oe;let j=(q=n.getKeyRightOf)===null||q===void 0?void 0:q.call(n,t.focusedKey);j==null&&s&&(j=T==="rtl"?(re=n.getLastKey)===null||re===void 0?void 0:re.call(n,t.focusedKey):(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),j!=null&&(O.preventDefault(),$(j,T==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){O.preventDefault();let j=n.getFirstKey(t.focusedKey,Er(O));t.setFocusedKey(j),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(j):p&&t.replaceSelection(j)}break;case"End":if(n.getLastKey){O.preventDefault();let j=n.getLastKey(t.focusedKey,Er(O));t.setFocusedKey(j),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(j):p&&t.replaceSelection(j)}break;case"PageDown":if(n.getKeyPageBelow){let j=n.getKeyPageBelow(t.focusedKey);j!=null&&(O.preventDefault(),$(j))}break;case"PageUp":if(n.getKeyPageAbove){let j=n.getKeyPageAbove(t.focusedKey);j!=null&&(O.preventDefault(),$(j))}break;case"a":Er(O)&&t.selectionMode==="multiple"&&c!==!0&&(O.preventDefault(),t.selectAll());break;case"Escape":!l&&t.selectedKeys.size!==0&&(O.stopPropagation(),O.preventDefault(),t.clearSelection());break;case"Tab":if(!u){if(O.shiftKey)r.current.focus();else{let j=Xm(r.current,{tabbable:!0}),B,z;do z=j.lastChild(),z&&(B=z);while(z);B&&!B.contains(document.activeElement)&&nn(B)}break}}},N=x.useRef({top:0,left:0});Mm(S,"scroll",h?null:()=>{N.current={top:S.current.scrollTop,left:S.current.scrollLeft}});let M=O=>{if(t.isFocused){O.currentTarget.contains(O.target)||t.setFocused(!1);return}if(O.currentTarget.contains(O.target)){if(t.setFocused(!0),t.focusedKey==null){let L=A=>{A!=null&&(t.setFocusedKey(A),p&&t.replaceSelection(A))},Z=O.relatedTarget;var $,J;Z&&O.currentTarget.compareDocumentPosition(Z)&Node.DOCUMENT_POSITION_FOLLOWING?L(($=t.lastSelectedKey)!==null&&$!==void 0?$:n.getLastKey()):L((J=t.firstSelectedKey)!==null&&J!==void 0?J:n.getFirstKey())}else h||(S.current.scrollTop=N.current.top,S.current.scrollLeft=N.current.left);if(t.focusedKey!=null){let L=S.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);L&&(L.contains(document.activeElement)||nn(L),sl()==="keyboard"&&Om(L,{containingElement:r.current}))}}},I=O=>{O.currentTarget.contains(O.relatedTarget)||t.setFocused(!1)};const k=x.useRef(a);x.useEffect(()=>{if(k.current){let O=null;a==="first"&&(O=n.getFirstKey()),a==="last"&&(O=n.getLastKey());let $=t.selectedKeys;if($.size){for(let J of $)if(t.canSelectItem(J)){O=J;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!f&&il(r.current)}},[]);let V=x.useRef(t.focusedKey);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==V.current||k.current)&&(S!=null&&S.current)){let O=sl(),$=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!$)return;(O==="keyboard"||k.current)&&(_m(S.current,$),O!=="virtual"&&Om($,{containingElement:r.current}))}!f&&t.isFocused&&t.focusedKey==null&&V.current!=null&&il(r.current),V.current=t.focusedKey,k.current=!1}),Mm(r,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let R={onKeyDown:E,onFocus:M,onBlur:I,onMouseDown(O){S.current===O.target&&O.preventDefault()}},{typeSelectProps:w}=NC({keyboardDelegate:n,selectionManager:t});m||(R=Nn(w,R));let P;return f||(P=t.focusedKey==null?0:-1),{collectionProps:{...R,tabIndex:P}}}function tD(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:a,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:m,linkBehavior:f="action"}=e,u=qi(),h=Y=>{if(Y.pointerType==="keyboard"&&Qi(Y))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(f==="selection"){let U=t.getItemProps(n);u.open(r.current,Y,U.href,U.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(f==="override"||f==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):Y&&Y.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||Y&&(Er(Y)||Y.pointerType==="touch"||Y.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};x.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!s&&(l?l():document.activeElement!==r.current&&il(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),c=c||t.isDisabled(n);let S={};!s&&!c?S={tabIndex:n===t.focusedKey?0:-1,onFocus(Y){Y.target===r.current&&t.setFocusedKey(n)}}:c&&(S.onMouseDown=Y=>{Y.preventDefault()});let y=t.isLink(n)&&f==="override",T=t.isLink(n)&&f!=="selection"&&f!=="none",C=!c&&t.canSelectItem(n)&&!y,E=(p||T)&&!c,N=E&&(t.selectionBehavior==="replace"?!C:!C||t.isEmpty),M=E&&C&&t.selectionBehavior==="replace",I=N||M,k=x.useRef(null),V=I&&C,R=x.useRef(!1),w=x.useRef(!1),P=Y=>{if(p&&p(),T){let U=t.getItemProps(n);u.open(r.current,Y,U.href,U.routerOptions)}},O={};a?(O.onPressStart=Y=>{k.current=Y.pointerType,R.current=V,Y.pointerType==="keyboard"&&(!I||of())&&h(Y)},m?(O.onPressUp=N?null:Y=>{Y.pointerType!=="keyboard"&&C&&h(Y)},O.onPress=N?P:null):O.onPress=Y=>{if(N||M&&Y.pointerType!=="mouse"){if(Y.pointerType==="keyboard"&&!rf())return;P(Y)}else Y.pointerType!=="keyboard"&&C&&h(Y)}):(O.onPressStart=Y=>{k.current=Y.pointerType,R.current=V,w.current=N,C&&(Y.pointerType==="mouse"&&!N||Y.pointerType==="keyboard"&&(!E||of()))&&h(Y)},O.onPress=Y=>{(Y.pointerType==="touch"||Y.pointerType==="pen"||Y.pointerType==="virtual"||Y.pointerType==="keyboard"&&I&&rf()||Y.pointerType==="mouse"&&w.current)&&(I?P(Y):C&&h(Y))}),S["data-key"]=n,O.preventFocusOnPress=s;let{pressProps:$,isPressed:J}=$m(O),L=M?Y=>{k.current==="mouse"&&(Y.stopPropagation(),Y.preventDefault(),P(Y))}:void 0,{longPressProps:Z}=HC({isDisabled:!V,onLongPress(Y){Y.pointerType==="touch"&&(h(Y),t.setSelectionBehavior("toggle"))}}),A=Y=>{k.current==="touch"&&R.current&&Y.preventDefault()},ne=t.isLink(n)?Y=>{Zn.isOpening||Y.preventDefault()}:void 0;return{itemProps:Nn(S,C||N?$:{},V?Z:{},{onDoubleClick:L,onDragStartCapture:A,onClick:ne}),isPressed:J,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:C,hasAction:I}}function rf(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function of(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}function nD(e,t,n){let{key:r,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:l,selectedKey:c}=t,p=r===c,m=a||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:f,isPressed:u}=tD({selectionManager:l,key:r,ref:n,isDisabled:m,shouldSelectOnPressUp:s,linkBehavior:"selection"}),h=da(t,r,"tab"),S=da(t,r,"tabpanel"),{tabIndex:y}=f,T=t.collection.getItem(r),C=sC(T==null?void 0:T.props,{labelable:!0});delete C.id;let E=bC(T==null?void 0:T.props);return{tabProps:Nn(C,E,f,{id:h,"aria-selected":p,"aria-disabled":m||void 0,"aria-controls":p?S:void 0,tabIndex:m?void 0:y,role:"tab"}),isSelected:p,isDisabled:m,isPressed:u}}function rD(e,t,n){let r=zC(n)?void 0:0;var a;const s=da(t,(a=e.id)!==null&&a!==void 0?a:t==null?void 0:t.selectedKey,"tabpanel"),l=xm({...e,id:s,"aria-labelledby":da(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:Nn(l,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class oD{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}isDisabled(t){var n,r;return this.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.isDisabled(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.isDisabled(t)&&(t=this.getPreviousKey(t)),t}getKeyAbove(t){return this.tabDirection?null:this.getPreviousKey(t)}getKeyBelow(t){return this.tabDirection?null:this.getNextKey(t)}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.isDisabled(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.isDisabled(t));return t}constructor(t,n,r,a=new Set){this.collection=t,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=a,this.tabDirection=r==="horizontal"}}function aD(e,t,n){let{orientation:r="horizontal",keyboardActivation:a="automatic"}=e,{collection:s,selectionManager:l,disabledKeys:c}=t,{direction:p}=nf(),m=x.useMemo(()=>new oD(s,p,r,c),[s,c,r,p]),{collectionProps:f}=eD({ref:n,selectionManager:l,keyboardDelegate:m,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=Tm();bm.set(t,u);let h=xm({...e,id:u});return{tabListProps:{...Nn(f,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function af({item:e,state:t}){const{key:n}=e,r=o.useRef(null),{tabProps:a}=nD({key:n},t,r),s=t.selectedKey===n,l=t.disabledKeys.has(n);return o.createElement("div",{...a,ref:r,className:G("sps-nav__item","sps-nav__link",s&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function sf({state:e,...t}){const n=o.useRef(null),{tabPanelProps:r}=rD(t,e,n);return o.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class lf{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return(n==null?void 0:n.childNodes)||[]}constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let c of l.childNodes)n(c)};for(let l of t)n(l);let r=null,a=0;for(let[l,c]of this.keyMap)r?(r.nextKey=l,c.prevKey=r.key):(this.firstKey=l,c.prevKey=void 0),c.type==="item"&&(c.index=a++),r=c,r.nextKey=void 0;var s;this.lastKey=(s=r==null?void 0:r.key)!==null&&s!==void 0?s:null}}class Kt extends Set{constructor(t,n,r){super(t),t instanceof Kt?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function sD(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function iD(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:a="toggle",disabledBehavior:s="all"}=e,l=x.useRef(!1),[,c]=x.useState(!1),p=x.useRef(null),m=x.useRef(null),[,f]=x.useState(null),u=x.useMemo(()=>cf(e.selectedKeys),[e.selectedKeys]),h=x.useMemo(()=>cf(e.defaultSelectedKeys,new Kt),[e.defaultSelectedKeys]),[S,y]=Pm(u,h,e.onSelectionChange),T=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[C,E]=x.useState(a);a==="replace"&&C==="toggle"&&typeof S=="object"&&S.size===0&&E("replace");let N=x.useRef(a);return x.useEffect(()=>{a!==N.current&&(E(a),N.current=a)},[a]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:C,setSelectionBehavior:E,get isFocused(){return l.current},setFocused(M){l.current=M,c(M)},get focusedKey(){return p.current},get childFocusStrategy(){return m.current},setFocusedKey(M,I="first"){p.current=M,m.current=I,f(M)},selectedKeys:S,setSelectedKeys(M){(r||!sD(M,S))&&y(M)},disabledKeys:T,disabledBehavior:s}}function cf(e,t){return e?e==="all"?"all":new Kt(e):t}class lD{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){return this.state.selectionMode==="none"?!1:(t=this.getKey(t),this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&or.compareNodeOrder(this.collection,r,t)<0)&&(t=r)}return t==null?void 0:t.key}get lastSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&or.compareNodeOrder(this.collection,r,t)>0)&&(t=r)}return t==null?void 0:t.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new Kt([t],t,t);else{let s=this.state.selectedKeys;var r;let l=(r=s.anchorKey)!==null&&r!==void 0?r:t;n=new Kt(s,l,t);var a;for(let c of this.getKeyRange(l,(a=s.currentKey)!==null&&a!==void 0?a:t))n.delete(c);for(let c of this.getKeyRange(t,l))this.canSelectItem(c)&&n.add(c)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),a=this.collection.getItem(n);return r&&a?or.compareNodeOrder(this.collection,r,a)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let a=[],s=t;for(;s!=null;){let l=this.collection.getItem(s);if((l&&l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&a.push(s),s===n)return a;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}if(t=this.getKey(t),t==null)return;let n=new Kt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none"||(t=this.getKey(t),t==null))return;let n=this.canSelectItem(t)?new Kt([t],t,t):new Kt;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Kt;for(let r of t)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){let a=this.collection.getItem(r);a.type==="item"&&t.push(r),a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n(or.getFirstItem(or.getChildNodes(a,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Kt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}constructor(t,n,r){this.collection=t,this.state=n;var a;this.allowsCellSelection=(a=r==null?void 0:r.allowsCellSelection)!==null&&a!==void 0?a:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function cD(e){let{filter:t,layoutDelegate:n}=e,r=iD(e),a=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=x.useCallback(f=>t?new lf(t(f)):new lf(f),[t]),l=x.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=or.useCollection(e,s,l),p=x.useMemo(()=>new lD(c,r,{layoutDelegate:n}),[c,r,n]);const m=x.useRef(null);return x.useEffect(()=>{if(r.focusedKey!=null&&!c.getItem(r.focusedKey)&&m.current){const E=m.current.getItem(r.focusedKey),N=[...m.current.getKeys()].map(w=>{const P=m.current.getItem(w);return(P==null?void 0:P.type)==="item"?P:null}).filter(w=>w!==null),M=[...c.getKeys()].map(w=>{const P=c.getItem(w);return(P==null?void 0:P.type)==="item"?P:null}).filter(w=>w!==null);var f,u;const I=((f=N==null?void 0:N.length)!==null&&f!==void 0?f:0)-((u=M==null?void 0:M.length)!==null&&u!==void 0?u:0);var h,S,y;let k=Math.min(I>1?Math.max(((h=E==null?void 0:E.index)!==null&&h!==void 0?h:0)-I+1,0):(S=E==null?void 0:E.index)!==null&&S!==void 0?S:0,((y=M==null?void 0:M.length)!==null&&y!==void 0?y:0)-1),V=null,R=!1;for(;k>=0;){if(!p.isDisabled(M[k].key)){V=M[k];break}if(k<M.length-1&&!R)k++;else{R=!0;var T,C;k>((T=E==null?void 0:E.index)!==null&&T!==void 0?T:0)&&(k=(C=E==null?void 0:E.index)!==null&&C!==void 0?C:0),k--}}r.setFocusedKey(V?V.key:null)}m.current=c},[c,p,r,r.focusedKey]),{collection:c,disabledKeys:a,selectionManager:p}}function dD(e){var t;let[n,r]=Pm(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),a=x.useMemo(()=>n!=null?[n]:[],[n]),{collection:s,disabledKeys:l,selectionManager:c}=cD({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:m=>{if(m==="all")return;var f;let u=(f=m.values().next().value)!==null&&f!==void 0?f:null;u===n&&e.onSelectionChange&&e.onSelectionChange(u),r(u)}}),p=n!=null?s.getItem(n):null;return{collection:s,disabledKeys:l,selectionManager:c,selectedKey:n,setSelectedKey:r,selectedItem:p}}function pD(e){var t;let n=dD({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:df(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:r,collection:a,selectedKey:s}=n,l=x.useRef(s);return x.useEffect(()=>{let c=s;(r.isEmpty||!a.getItem(c))&&(c=df(a,n.disabledKeys),c!=null&&r.setSelectedKeys([c])),(c!=null&&r.focusedKey==null||!r.isFocused&&c!==l.current)&&r.setFocusedKey(c),l.current=c}),{...n,isDisabled:e.isDisabled||!1}}function df(e,t){let n=null;if(e){var r,a,s,l;for(n=e.getFirstKey();(t.has(n)||!((a=e.getItem(n))===null||a===void 0||(r=a.props)===null||r===void 0)&&r.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);(t.has(n)||!((l=e.getItem(n))===null||l===void 0||(s=l.props)===null||s===void 0)&&s.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}const uD={},mD={};function pl(e){const t=pD(e),n=o.useRef(null),{tabListProps:r}=aD(e,t,n);return o.createElement(o.Fragment,null,o.createElement("div",{...r,ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"},[...t.collection].map(a=>o.createElement(af,{key:a.key,item:a,state:t}))),o.createElement(sf,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(pl,{props:uD,propTypes:mD,displayName:"SpsTabsV2"});const fD={};function ul({children:e,className:t,...n}){return o.createElement("div",{className:G("sps-card__footer",t),...n},e)}Object.assign(ul,{props:fD,displayName:"SpsCardV2Footer"});const hD={};function ml({children:e,className:t,...n}){return o.createElement("div",{className:G("sps-card__header",t),...n},e)}Object.assign(ml,{props:hD,displayName:"SpsCardV2Header"});const SD={};function pf({children:e,className:t,...n}){const[r,a,s,l,c]=It(e,[{type:ml},{type:pl},{type:Ih.Tabs},{type:ul}]),p=a.length>0?a:s;return o.createElement("div",{className:G("sps-card",t),...n},r,p.length>0?p:o.createElement("div",{className:"sps-card__body"},c),l)}Object.assign(pf,{props:SD,displayName:"SpsCardV2"});const gD={};function uf({children:e,className:t,...n}){return o.createElement("div",{className:G("sps-card__title",t),...n},e)}Object.assign(uf,{props:gD,displayName:"SpsCardV2Title"});const bD={...Hp,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function mf(e){const{children:t,className:n,controlsDisabled:r,footerLinks:a,formArray:s,formGroup:l,formMeta:c,isOpen:p,onClear:m,onSubmit:f,unsafelyReplaceClassName:u,...h}=e,{t:S}=o.useContext(He);function y(){m&&m()}const T=G(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return o.createElement("div",{className:T,...h},o.createElement(no,{onSubmit:f,formArray:s,formGroup:l,formMeta:c},o.createElement("div",{className:"sps-advanced-search__form"},t),o.createElement("div",{className:"sps-advanced-search__footer"},a&&o.createElement("div",{id:"footer_links"},vt(a)),o.createElement("div",{className:"sps-advanced-search__footer-controls"},o.createElement(Ue,{kind:W.ButtonKind.DEFAULT,type:W.ButtonType.BUTTON,className:"mr-2",onClick:y,disabled:r},S("design-system:advancedSearch.clear")),o.createElement(Ue,{kind:W.ButtonKind.KEY,type:W.ButtonType.SUBMIT,disabled:r},S("design-system:advancedSearch.search"))))))}Object.assign(mf,{props:bD,displayName:"SpsAdvancedSearch"});const vD={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>o.createElement(o.Fragment,null,o.createElement("p",null,'Advanced Search is comprised of a panel of input fields, and a text button that exposes and hides the panel. By default, the Advanced Search panel is hidden (with the exception of "Advanced Search Only" scenarios).'),o.createElement("p",null,"Advanced Search works in conjunction with the"," ",o.createElement(e,{to:"list-toolbar"},"List Bar")," and"," ",o.createElement(e,{to:"search-results-bar"},"Search Results")," components. Refer to those pages for additional details."),o.createElement("p",null,"Use the following guidelines when including Advanced Search on your page:",o.createElement("ul",null,o.createElement("li",null,"The Advanced Search Panel can contain any number of input fields."),o.createElement("li",null,"The Advanced Search Panel can place input fields in any unique layout to best serve the needs of the search criteria, but must adhere to the rules of the"," ",o.createElement(t,{to:"/style-and-layout/grid/"},"SPS Grid")," and guidelines for"," ",o.createElement(e,{to:"form"},"Form Layouts"),"."))))},basic:{label:"Basic Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("p",null,"A Basic Advanced Search consists of the List Bar with a search input and an Advanced Search text button. For more details on additional button and component options in the List Bar reference the ",o.createElement(e,{to:"list-toolbar"},"List Bar")," page.")),examples:{basic:{react:v.code`
|
|
9140
|
+
`}}}},Ww={Autocomplete:{components:[Jt],examples:fc},Checkboxes:{components:[Fn],examples:hc},"Clickable Tags":{components:[Ar],examples:Sc},"Column Chooser":{components:[ci,zo],examples:Gp},"Conditional Fields":{description:()=>o.createElement("p",null,"A conditional field is one that is only available when a certain option is selected amongst a set of checkboxes or radio buttons."),components:[Wi],examples:mm},"Content Rows":{components:[di,Gn,jo],examples:Yp},"Content Sections":{components:[bi],examples:bu},"Date Pickers":{components:[pi],examples:Xp},"Date Range Pickers":{components:[mi],examples:tu},"Date Time Range Pickers":{components:[fi],examples:su},Datetime:{components:[Si],examples:lu},"Time Input":{components:[Yi],examples:gm},"Description Lists":{description:()=>o.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[Zo,Xo,ea],examples:Su},Dropdown:{components:[zn,gi],examples:gu},"Filter Panel":{components:[Vi,$i,Ki,Hi],examples:um},Form:{components:[ro],examples:Wp},Incrementor:{components:[vi],examples:vu},Label:{description:()=>o.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[yi],examples:yu},"List Action Bar":{description:()=>o.createElement("p",null,"The List Action Bar contains the action buttons relevant to selected items from a Table List, Row List, or Card List. The List Action Bar is only visible when one or more list items have been selected and appears anchored to the bottom of the page above all other content."),components:[Ti],examples:Fu},"Micro Block":{components:[Ei],examples:Vu},Modals:{description:()=>o.createElement("p",null,"Modals are overlays on a page that focus a user’s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),components:[wi,na],examples:Ku},"Multi Select":{description:()=>o.createElement("p",null,"Multi-Selects consist of a Label and a dropdown menu from which a user selects one or more values from a list of pre-defined options."),components:[Di],examples:Hu},"Multi Value Text Input":{description:()=>o.createElement("p",null,"To be determined."),components:[Gi],examples:hm},Pagination:{description:()=>o.createElement("p",null,"The Pagination component allows users to navigate lists of records and control the number of records displayed on each page. The records can span across multiple pages, or within sections of a page."),components:[Ni,ra],examples:Wu},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[ki],examples:Gu},Selects:{description:"Selects consist off a Label and a dropdown menu from which a user selects a value from a list of pre-defined options.",components:[Yn],examples:nu},"Side Navigation":{description:"Side Navigations are used to provide quick access to a series of related pages or content. It can be used to navigate between different page views, or as an anchor-style menu to scroll to specific content on the same page.",components:[Uu],examples:zu},"Split Button":{components:[Ii],examples:ju},"Summary List Row":{components:[xi,Mi,ao],examples:qu},Tables:{description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("div",{className:"sps-body-14"},"Tables (along with ",o.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",o.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),o.createElement("br",null),o.createElement("div",{className:"sps-body-14"},"Tables are the ideal solution for displaying tabular data, especially when the listed records contain a considerable amount of data points. While tables are primarily used to display an extensive list of records, often in a paginated format, they can also be used to display smaller sets of tabular data in any context.")),components:[jn,Cn,pe,wn,ot,Ge],examples:Au},"Task Queue":{components:[_i],examples:Ju},"Text Inputs":{description:()=>o.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[aa],examples:Zu},"Text Areas":{description:()=>o.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[Li],examples:Xu},Toggles:{description:()=>o.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[Oi],examples:em},Tooltips:{components:[Lt,Pi],examples:tm},Wizard:{components:[Bi,Ai],examples:om},Workflow:{components:[sa,ia,la,ca],examples:pm,notices:[Rw]},"Slide In Panels":{description:"",components:[Ci],examples:$u}},bm=new WeakMap;function da(e,t,n){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${bm.get(e)}-${n}-${t}`):""}const so=typeof document<"u"?x.useLayoutEffect:()=>{};function yr(e){const t=x.useRef(null);return so(()=>{t.current=e},[e]),x.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const pa={prefix:String(Math.round(Math.random()*1e10)),current:0},vm=x.createContext(pa),Gw=x.createContext(!1);let Yw=!!(typeof window<"u"&&window.document&&window.document.createElement),Ui=new WeakMap;function Uw(e=!1){let t=x.useContext(vm),n=x.useRef(null);if(n.current===null&&!e){var r,a;let s=(a=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let l=Ui.get(s);l==null?Ui.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==l.state&&(t.current=l.id,Ui.delete(s))}n.current=++t.current}return n.current}function zw(e){let t=x.useContext(vm);t===pa&&!Yw&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Uw(!!e),r=t===pa&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function jw(e){let t=x.useId(),[n]=x.useState(ym()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${pa.prefix}`;return e||`${r}-${t}`}const qw=typeof x.useId=="function"?jw:zw;function Jw(){return!1}function Zw(){return!0}function Xw(e){return()=>{}}function ym(){return typeof x.useSyncExternalStore=="function"?x.useSyncExternalStore(Xw,Jw,Zw):x.useContext(Gw)}let Qw=!!(typeof window<"u"&&window.document&&window.document.createElement),Dn=new Map;function Tm(e){let[t,n]=x.useState(e),r=x.useRef(null),a=qw(t),s=x.useCallback(l=>{r.current=l},[]);return Qw&&(Dn.has(a)&&!Dn.get(a).includes(s)?Dn.set(a,[...Dn.get(a),s]):Dn.set(a,[s])),so(()=>{let l=a;return()=>{Dn.delete(l)}},[a]),x.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),a}function eC(e,t){if(e===t)return e;let n=Dn.get(e);if(n)return n.forEach(a=>a(t)),t;let r=Dn.get(t);return r?(r.forEach(a=>a(e)),e):t}function Em(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Nt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},qn=e=>e&&"window"in e&&e.window===e?e:Nt(e).defaultView||window;function wm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=wm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=wm(e))&&(r&&(r+=" "),r+=t);return r}function Nn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let a in r){let s=t[a],l=r[a];typeof s=="function"&&typeof l=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Em(s,l):(a==="className"||a==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[a]=tC(s,l):a==="id"&&s&&l?t.id=eC(s,l):t[a]=l!==void 0?l:s}}return t}const nC=new Set(["id"]),rC=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),oC=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),aC=/^(data-.*)$/;function sC(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,s={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(nC.has(l)||n&&rC.has(l)||r&&oC.has(l)||a!=null&&a.has(l)||aC.test(l))&&(s[l]=e[l]);return s}function nn(e){if(iC())e.focus({preventScroll:!0});else{let t=lC(e);e.focus(),cC(t)}}let ua=null;function iC(){if(ua==null){ua=!1;try{document.createElement("div").focus({get preventScroll(){return ua=!0,!0}})}catch{}}return ua}function lC(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function cC(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function ma(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function zi(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function rn(e){let t=null;return()=>(t==null&&(t=e()),t)}const Jn=rn(function(){return zi(/^Mac/i)}),dC=rn(function(){return zi(/^iPhone/i)}),Cm=rn(function(){return zi(/^iPad/i)||Jn()&&navigator.maxTouchPoints>1}),ji=rn(function(){return dC()||Cm()}),pC=rn(function(){return Jn()||ji()}),uC=rn(function(){return ma(/AppleWebKit/i)&&!mC()}),mC=rn(function(){return ma(/Chrome/i)}),Dm=rn(function(){return ma(/Android/i)}),fC=rn(function(){return ma(/Firefox/i)}),hC=x.createContext({isNative:!0,open:gC,useHref:e=>e});function qi(){return x.useContext(hC)}function Zn(e,t,n=!0){var r,a;let{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}=t;fC()&&(!((a=window.event)===null||a===void 0||(r=a.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Jn()?s=!0:l=!0);let m=uC()&&Jn()&&!Cm()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}):new MouseEvent("click",{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p,bubbles:!0,cancelable:!0});Zn.isOpening=n,nn(e),e.dispatchEvent(m),Zn.isOpening=!1}Zn.isOpening=!1;function SC(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function gC(e,t){SC(e,n=>Zn(n,t))}function bC(e){let t=qi();var n;const r=t.useHref((n=e==null?void 0:e.href)!==null&&n!==void 0?n:"");return{href:e!=null&&e.href?r:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}let Tr=new Map,Ji=new Set;function Nm(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);a||(a=new Set,Tr.set(r.target,a),r.target.addEventListener("transitioncancel",n,{once:!0})),a.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),Tr.delete(r.target)),Tr.size===0)){for(let s of Ji)s();Ji.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Nm():document.addEventListener("DOMContentLoaded",Nm));function km(e){requestAnimationFrame(()=>{Tr.size===0?e():Ji.add(e)})}function Im(){let e=x.useRef(new Map),t=x.useCallback((a,s,l,c)=>{let p=c!=null&&c.once?(...m)=>{e.current.delete(l),l(...m)}:l;e.current.set(l,{type:s,eventTarget:a,fn:p,options:c}),a.addEventListener(s,l,c)},[]),n=x.useCallback((a,s,l,c)=>{var p;let m=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;a.removeEventListener(s,m,c),e.current.delete(l)},[]),r=x.useCallback(()=>{e.current.forEach((a,s)=>{n(a.eventTarget,a.type,s,a.options)})},[n]);return x.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function xm(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Tm(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!r&&!a&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function vC(e,t){so(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function yC(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function TC(e,t){const n=[];for(;e&&e!==document.documentElement;)yC(e,t)&&n.push(e),e=e.parentElement;return n}let EC=0;const Zi=new Map;function wC(e){let[t,n]=x.useState();return so(()=>{if(!e)return;let r=Zi.get(e);if(r)n(r.element.id);else{let a=`react-aria-description-${EC++}`;n(a);let s=document.createElement("div");s.id=a,s.style.display="none",s.textContent=e,document.body.appendChild(s),r={refCount:0,element:s},Zi.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Zi.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Mm(e,t,n,r){let a=yr(n),s=n==null;x.useEffect(()=>{if(s||!e.current)return;let l=e.current;return l.addEventListener(t,a,r),()=>{l.removeEventListener(t,a,r)}},[e,t,r,s,a])}function _m(e,t){let n=Lm(e,t,"left"),r=Lm(e,t,"top"),a=t.offsetWidth,s=t.offsetHeight,l=e.scrollLeft,c=e.scrollTop,{borderTopWidth:p,borderLeftWidth:m}=getComputedStyle(e),f=e.scrollLeft+parseInt(m,10),u=e.scrollTop+parseInt(p,10),h=f+e.clientWidth,S=u+e.clientHeight;n<=l?l=n-parseInt(m,10):n+a>h&&(l+=n+a-h),r<=u?c=r-parseInt(p,10):r+s>S&&(c+=r+s-S),e.scrollLeft=l,e.scrollTop=c}function Lm(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[r];break}t=t.offsetParent}return a}function Om(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=TC(e);for(let m of p)_m(m,e)}else{var n;let{left:p,top:m}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:f,top:u}=e.getBoundingClientRect();if(Math.abs(p-f)>1||Math.abs(m-u)>1){var r,a,s;t==null||(a=t.containingElement)===null||a===void 0||(r=a.scrollIntoView)===null||r===void 0||r.call(a,{block:"center",inline:"center"}),(s=e.scrollIntoView)===null||s===void 0||s.call(e,{block:"nearest"})}}}}function Xi(e){return e.mozInputSource===0&&e.isTrusted?!0:Dm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function CC(e){return!Dm()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Pm(e,t,n){let[r,a]=x.useState(e||t),s=x.useRef(e!==void 0),l=e!==void 0;x.useEffect(()=>{let m=s.current;m!==l&&console.warn(`WARN: A component changed from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?e:r,p=x.useCallback((m,...f)=>{let u=(h,...S)=>{n&&(Object.is(c,h)||n(h,...S)),l||(c=h)};typeof m=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((S,...y)=>{let T=m(l?c:S,...y);return u(T,...f),l?S:T})):(l||a(m),u(m,...f))},[l,c,n]);return[c,p]}function Qi(e){return pC()?e.altKey:e.ctrlKey}function Er(e){return Jn()?e.metaKey:e.ctrlKey}const DC=1e3;function NC(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,a=x.useRef({search:"",timeout:null}).current,s=l=>{let c=kC(l.key);if(!c||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))return;c===" "&&a.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),a.search+=c;let p=t.getKeyForSearch(a.search,n.focusedKey);p==null&&(p=t.getKeyForSearch(a.search)),p!=null&&(n.setFocusedKey(p),r&&r(p)),clearTimeout(a.timeout),a.timeout=setTimeout(()=>{a.search=""},DC)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:null}}}function kC(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}let wr="default",el="",fa=new WeakMap;function Rm(e){if(ji()){if(wr==="default"){const t=Nt(e);el=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}wr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(fa.set(e,e.style.userSelect),e.style.userSelect="none")}function ha(e){if(ji()){if(wr!=="disabled")return;wr="restoring",setTimeout(()=>{km(()=>{if(wr==="restoring"){const t=Nt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=el||""),el="",wr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&fa.has(e)){let t=fa.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),fa.delete(e)}}const Bm=x.createContext({register:()=>{}});Bm.displayName="PressResponderContext";function IC(e,t){return t.get?t.get.call(e):t.value}function Am(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function xC(e,t){var n=Am(e,t,"get");return IC(e,n)}function MC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _C(e,t,n){MC(e,t),t.set(e,n)}function LC(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Fm(e,t,n){var r=Am(e,t,"set");return LC(e,r,n),n}function OC(e){let t=x.useContext(Bm);if(t){let{register:n,...r}=t;e=Nn(r,e),n()}return vC(t,e.ref),e}var Sa=new WeakMap;class ga{continuePropagation(){Fm(this,Sa,!1)}get shouldStopPropagation(){return xC(this,Sa)}constructor(t,n,r,a){_C(this,Sa,{writable:!0,value:void 0}),Fm(this,Sa,!0);var s;let l=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:r.currentTarget;const c=l==null?void 0:l.getBoundingClientRect();let p,m=0,f,u=null;r.clientX!=null&&r.clientY!=null&&(f=r.clientX,u=r.clientY),c&&(f!=null&&u!=null?(p=f-c.left,m=u-c.top):(p=c.width/2,m=c.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=p,this.y=m}}const Vm=Symbol("linkClicked");function $m(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:s,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:f,ref:u,...h}=OC(e),[S,y]=x.useState(!1),T=x.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:E}=Im(),N=yr((w,P)=>{let O=T.current;if(l||O.didFirePressStart)return!1;let $=!0;if(O.isTriggeringEvent=!0,r){let J=new ga("pressstart",P,w);r(J),$=J.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,y(!0),$}),M=yr((w,P,O=!0)=>{let $=T.current;if(!$.didFirePressStart)return!1;$.ignoreClickAfterPress=!0,$.didFirePressStart=!1,$.isTriggeringEvent=!0;let J=!0;if(a){let L=new ga("pressend",P,w);a(L),J=L.shouldStopPropagation}if(n&&n(!1),y(!1),t&&O&&!l){let L=new ga("press",P,w);t(L),J&&(J=L.shouldStopPropagation)}return $.isTriggeringEvent=!1,J}),I=yr((w,P)=>{let O=T.current;if(l)return!1;if(s){O.isTriggeringEvent=!0;let $=new ga("pressup",P,w);return s($),O.isTriggeringEvent=!1,$.shouldStopPropagation}return!0}),k=yr(w=>{let P=T.current;P.isPressed&&P.target&&(P.isOverTarget&&P.pointerType!=null&&M(on(P.target,w),P.pointerType,!1),P.isPressed=!1,P.isOverTarget=!1,P.activePointerId=null,P.pointerType=null,E(),f||ha(P.target))}),V=yr(w=>{m&&k(w)}),R=x.useMemo(()=>{let w=T.current,P={onKeyDown($){if(nl($.nativeEvent,$.currentTarget)&&$.currentTarget.contains($.target)){var J;Wm($.target,$.key)&&$.preventDefault();let L=!0;if(!w.isPressed&&!$.repeat){w.target=$.currentTarget,w.isPressed=!0,L=N($,"keyboard");let Z=$.currentTarget,A=ne=>{nl(ne,Z)&&!ne.repeat&&Z.contains(ne.target)&&w.target&&I(on(w.target,ne),"keyboard")};C(Nt($.currentTarget),"keyup",Em(A,O),!0)}L&&$.stopPropagation(),$.metaKey&&Jn()&&((J=w.metaKeyEvents)===null||J===void 0||J.set($.key,$.nativeEvent))}else $.key==="Meta"&&(w.metaKeyEvents=new Map)},onClick($){if(!($&&!$.currentTarget.contains($.target))&&$&&$.button===0&&!w.isTriggeringEvent&&!Zn.isOpening){let J=!0;if(l&&$.preventDefault(),!w.ignoreClickAfterPress&&!w.ignoreEmulatedMouseEvents&&!w.isPressed&&(w.pointerType==="virtual"||Xi($.nativeEvent))){!l&&!p&&nn($.currentTarget);let L=N($,"virtual"),Z=I($,"virtual"),A=M($,"virtual");J=L&&Z&&A}w.ignoreEmulatedMouseEvents=!1,w.ignoreClickAfterPress=!1,J&&$.stopPropagation()}}},O=$=>{var J;if(w.isPressed&&w.target&&nl($,w.target)){var L;Wm($.target,$.key)&&$.preventDefault();let A=$.target;M(on(w.target,$),"keyboard",w.target.contains(A)),E(),$.key!=="Enter"&&tl(w.target)&&w.target.contains(A)&&!$[Vm]&&($[Vm]=!0,Zn(w.target,$,!1)),w.isPressed=!1,(L=w.metaKeyEvents)===null||L===void 0||L.delete($.key)}else if($.key==="Meta"&&(!((J=w.metaKeyEvents)===null||J===void 0)&&J.size)){var Z;let A=w.metaKeyEvents;w.metaKeyEvents=void 0;for(let ne of A.values())(Z=w.target)===null||Z===void 0||Z.dispatchEvent(new KeyboardEvent("keyup",ne))}};if(typeof PointerEvent<"u"){P.onPointerDown=A=>{if(A.button!==0||!A.currentTarget.contains(A.target))return;if(CC(A.nativeEvent)){w.pointerType="virtual";return}rl(A.currentTarget)&&A.preventDefault(),w.pointerType=A.pointerType;let ne=!0;w.isPressed||(w.isPressed=!0,w.isOverTarget=!0,w.activePointerId=A.pointerId,w.target=A.currentTarget,!l&&!p&&nn(A.currentTarget),f||Rm(w.target),ne=N(A,w.pointerType),C(Nt(A.currentTarget),"pointermove",$,!1),C(Nt(A.currentTarget),"pointerup",J,!1),C(Nt(A.currentTarget),"pointercancel",Z,!1)),ne&&A.stopPropagation()},P.onMouseDown=A=>{A.currentTarget.contains(A.target)&&A.button===0&&(rl(A.currentTarget)&&A.preventDefault(),A.stopPropagation())},P.onPointerUp=A=>{!A.currentTarget.contains(A.target)||w.pointerType==="virtual"||A.button===0&&Cr(A,A.currentTarget)&&I(A,w.pointerType||A.pointerType)};let $=A=>{A.pointerId===w.activePointerId&&(w.target&&Cr(A,w.target)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,N(on(w.target,A),w.pointerType)):w.target&&w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,M(on(w.target,A),w.pointerType,!1),V(A)))},J=A=>{A.pointerId===w.activePointerId&&w.isPressed&&A.button===0&&w.target&&(Cr(A,w.target)&&w.pointerType!=null?M(on(w.target,A),w.pointerType):w.isOverTarget&&w.pointerType!=null&&M(on(w.target,A),w.pointerType,!1),w.isPressed=!1,w.isOverTarget=!1,w.activePointerId=null,w.pointerType=null,E(),f||ha(w.target),"ontouchend"in w.target&&A.pointerType!=="mouse"&&C(w.target,"touchend",L,{once:!0}))},L=A=>{Hm(A.target)&&A.preventDefault()},Z=A=>{k(A)};P.onDragStart=A=>{A.currentTarget.contains(A.target)&&k(A)}}else{P.onMouseDown=L=>{if(L.button!==0||!L.currentTarget.contains(L.target))return;if(rl(L.currentTarget)&&L.preventDefault(),w.ignoreEmulatedMouseEvents){L.stopPropagation();return}w.isPressed=!0,w.isOverTarget=!0,w.target=L.currentTarget,w.pointerType=Xi(L.nativeEvent)?"virtual":"mouse",!l&&!p&&nn(L.currentTarget),N(L,w.pointerType)&&L.stopPropagation(),C(Nt(L.currentTarget),"mouseup",$,!1)},P.onMouseEnter=L=>{if(!L.currentTarget.contains(L.target))return;let Z=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!0,Z=N(L,w.pointerType)),Z&&L.stopPropagation()},P.onMouseLeave=L=>{if(!L.currentTarget.contains(L.target))return;let Z=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!1,Z=M(L,w.pointerType,!1),V(L)),Z&&L.stopPropagation()},P.onMouseUp=L=>{L.currentTarget.contains(L.target)&&!w.ignoreEmulatedMouseEvents&&L.button===0&&I(L,w.pointerType||"mouse")};let $=L=>{if(L.button===0){if(w.isPressed=!1,E(),w.ignoreEmulatedMouseEvents){w.ignoreEmulatedMouseEvents=!1;return}w.target&&Cr(L,w.target)&&w.pointerType!=null?M(on(w.target,L),w.pointerType):w.target&&w.isOverTarget&&w.pointerType!=null&&M(on(w.target,L),w.pointerType,!1),w.isOverTarget=!1}};P.onTouchStart=L=>{if(!L.currentTarget.contains(L.target))return;let Z=PC(L.nativeEvent);if(!Z)return;w.activePointerId=Z.identifier,w.ignoreEmulatedMouseEvents=!0,w.isOverTarget=!0,w.isPressed=!0,w.target=L.currentTarget,w.pointerType="touch",!l&&!p&&nn(L.currentTarget),f||Rm(w.target),N(kn(w.target,L),w.pointerType)&&L.stopPropagation(),C(qn(L.currentTarget),"scroll",J,!0)},P.onTouchMove=L=>{if(!L.currentTarget.contains(L.target))return;if(!w.isPressed){L.stopPropagation();return}let Z=Km(L.nativeEvent,w.activePointerId),A=!0;Z&&Cr(Z,L.currentTarget)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,A=N(kn(w.target,L),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,A=M(kn(w.target,L),w.pointerType,!1),V(kn(w.target,L))),A&&L.stopPropagation()},P.onTouchEnd=L=>{if(!L.currentTarget.contains(L.target))return;if(!w.isPressed){L.stopPropagation();return}let Z=Km(L.nativeEvent,w.activePointerId),A=!0;Z&&Cr(Z,L.currentTarget)&&w.pointerType!=null?(I(kn(w.target,L),w.pointerType),A=M(kn(w.target,L),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(A=M(kn(w.target,L),w.pointerType,!1)),A&&L.stopPropagation(),w.isPressed=!1,w.activePointerId=null,w.isOverTarget=!1,w.ignoreEmulatedMouseEvents=!0,w.target&&!f&&ha(w.target),E()},P.onTouchCancel=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),w.isPressed&&k(kn(w.target,L)))};let J=L=>{w.isPressed&&L.target.contains(w.target)&&k({currentTarget:w.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};P.onDragStart=L=>{L.currentTarget.contains(L.target)&&k(L)}}return P},[C,l,p,E,f,k,V,M,N,I]);return x.useEffect(()=>()=>{var w;f||ha((w=T.current.target)!==null&&w!==void 0?w:void 0)},[f]),{isPressed:c||S,pressProps:Nn(h,R)}}function tl(e){return e.tagName==="A"&&e.hasAttribute("href")}function nl(e,t){const{key:n,code:r}=e,a=t,s=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof qn(a).HTMLInputElement&&!Gm(a,n)||a instanceof qn(a).HTMLTextAreaElement||a.isContentEditable)&&!((s==="link"||!s&&tl(a))&&n!=="Enter")}function PC(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function Km(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const a=n[r];if(a.identifier===t)return a}return null}function kn(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function on(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function RC(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function BC(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Cr(e,t){let n=t.getBoundingClientRect(),r=RC(e);return BC(n,r)}function rl(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Hm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!tl(e)}function Wm(e,t){return e instanceof HTMLInputElement?!Gm(e,t):Hm(e)}const AC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Gm(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":AC.has(e.type)}let io=null,FC=new Set,lo=new Map,Xn=!1,ol=!1;function al(e,t){for(let n of FC)n(e,t)}function VC(e){return!(e.metaKey||!Jn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ba(e){Xn=!0,VC(e)&&(io="keyboard",al("keyboard",e))}function Ot(e){io="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Xn=!0,al("pointer",e))}function Ym(e){Xi(e)&&(Xn=!0,io="virtual")}function Um(e){e.target===window||e.target===document||(!Xn&&!ol&&(io="virtual",al("virtual",e)),Xn=!1,ol=!1)}function zm(){Xn=!1,ol=!0}function jm(e){if(typeof window>"u"||lo.get(qn(e)))return;const t=qn(e),n=Nt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Xn=!0,r.apply(this,arguments)},n.addEventListener("keydown",ba,!0),n.addEventListener("keyup",ba,!0),n.addEventListener("click",Ym,!0),t.addEventListener("focus",Um,!0),t.addEventListener("blur",zm,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ot,!0),n.addEventListener("pointermove",Ot,!0),n.addEventListener("pointerup",Ot,!0)):(n.addEventListener("mousedown",Ot,!0),n.addEventListener("mousemove",Ot,!0),n.addEventListener("mouseup",Ot,!0)),t.addEventListener("beforeunload",()=>{qm(e)},{once:!0}),lo.set(t,{focus:r})}const qm=(e,t)=>{const n=qn(e),r=Nt(e);t&&r.removeEventListener("DOMContentLoaded",t),lo.has(n)&&(n.HTMLElement.prototype.focus=lo.get(n).focus,r.removeEventListener("keydown",ba,!0),r.removeEventListener("keyup",ba,!0),r.removeEventListener("click",Ym,!0),n.removeEventListener("focus",Um,!0),n.removeEventListener("blur",zm,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ot,!0),r.removeEventListener("pointermove",Ot,!0),r.removeEventListener("pointerup",Ot,!0)):(r.removeEventListener("mousedown",Ot,!0),r.removeEventListener("mousemove",Ot,!0),r.removeEventListener("mouseup",Ot,!0)),lo.delete(n))};function $C(e){const t=Nt(e);let n;return t.readyState!=="loading"?jm(e):(n=()=>{jm(e)},t.addEventListener("DOMContentLoaded",n)),()=>qm(e,n)}typeof document<"u"&&$C();function sl(){return io}const KC=500;function HC(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:a,threshold:s=KC,accessibilityDescription:l}=e;const c=x.useRef(void 0);let{addGlobalListener:p,removeGlobalListener:m}=Im(),{pressProps:f}=$m({isDisabled:t,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),c.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...h,type:"longpress"}),c.current=void 0},s),h.pointerType==="touch")){let S=y=>{y.preventDefault()};p(h.target,"contextmenu",S,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{m(h.target,"contextmenu",S)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=wC(a&&!t?l:void 0);return{longPressProps:Nn(f,u)}}function il(e){const t=Nt(e);if(sl()==="virtual"){let n=t.activeElement;km(()=>{t.activeElement===n&&e.isConnected&&nn(e)})}else nn(e)}function WC(e){const t=qn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a=n!=="none"&&r!=="hidden"&&r!=="collapse";if(a){const{getComputedStyle:s}=e.ownerDocument.defaultView;let{display:l,visibility:c}=s(e);a=l!=="none"&&c!=="hidden"&&c!=="collapse"}return a}function GC(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Jm(e,t){return e.nodeName!=="#comment"&&WC(e)&&GC(e,t)&&(!e.parentElement||Jm(e.parentElement,e))}const ll=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],YC=ll.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ll.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const UC=ll.join(':not([hidden]):not([tabindex="-1"]),');function Zm(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Xm(e,t,n){let r=t!=null&&t.tabbable?UC:YC,a=Nt(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&Jm(s)&&(!n||Zm(s,n))&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class cl{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let a=this.fastMap.get(n??null);if(!a)return;let s=new Qm({scopeRef:t});a.addChild(s),s.parent=a,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Zm(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let a=n.children;r&&(r.removeChild(n),a.size>0&&a.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new cl;var r;for(let a of this.traverse())n.addTreeNode(a.scopeRef,(r=(t=a.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,a.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Qm({scopeRef:null}),this.fastMap.set(null,this.root)}}class Qm{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new cl;function zC(e,t){let n=t==null?void 0:t.isDisabled,[r,a]=x.useState(!1);return so(()=>{if(e!=null&&e.current&&!n){let s=()=>{if(e.current){let c=Xm(e.current,{tabbable:!0});a(!!c.nextNode())}};s();let l=new MutationObserver(s);return l.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{l.disconnect()}}}),n?!1:r}const jC=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),qC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function JC(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return jC.has(n.script)}let t=e.split("-")[0];return qC.has(t)}const ZC=Symbol.for("react-aria.i18n.locale");function ef(){let e=typeof window<"u"&&window[ZC]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:JC(e)?"rtl":"ltr"}}let dl=ef(),co=new Set;function tf(){dl=ef();for(let e of co)e(dl)}function XC(){let e=ym(),[t,n]=x.useState(dl);return x.useEffect(()=>(co.size===0&&window.addEventListener("languagechange",tf),co.add(n),()=>{co.delete(n),co.size===0&&window.removeEventListener("languagechange",tf)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const QC=x.createContext(null);function nf(){let e=XC();return x.useContext(QC)||e}function eD(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:a=!1,shouldFocusWrap:s=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,selectOnFocus:p=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:f,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:S=r,linkBehavior:y="action"}=e,{direction:T}=nf(),C=qi(),E=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const $=(j,B)=>{if(j!=null){if(t.isLink(j)&&y==="selection"&&p&&!Qi(O)){vo.flushSync(()=>{t.setFocusedKey(j,B)});let z=S.current.querySelector(`[data-key="${CSS.escape(j.toString())}"]`),Q=t.getItemProps(j);C.open(z,O,Q.href,Q.routerOptions);return}if(t.setFocusedKey(j,B),t.isLink(j)&&y==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(j):p&&!Qi(O)&&t.replaceSelection(j)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var J,L,Z;let j=t.focusedKey!=null?(J=n.getKeyBelow)===null||J===void 0?void 0:J.call(n,t.focusedKey):(L=n.getFirstKey)===null||L===void 0?void 0:L.call(n);j==null&&s&&(j=(Z=n.getFirstKey)===null||Z===void 0?void 0:Z.call(n,t.focusedKey)),j!=null&&(O.preventDefault(),$(j))}break;case"ArrowUp":if(n.getKeyAbove){var A,ne,Y;let j=t.focusedKey!=null?(A=n.getKeyAbove)===null||A===void 0?void 0:A.call(n,t.focusedKey):(ne=n.getLastKey)===null||ne===void 0?void 0:ne.call(n);j==null&&s&&(j=(Y=n.getLastKey)===null||Y===void 0?void 0:Y.call(n,t.focusedKey)),j!=null&&(O.preventDefault(),$(j))}break;case"ArrowLeft":if(n.getKeyLeftOf){var U,ae,H;let j=(U=n.getKeyLeftOf)===null||U===void 0?void 0:U.call(n,t.focusedKey);j==null&&s&&(j=T==="rtl"?(ae=n.getFirstKey)===null||ae===void 0?void 0:ae.call(n,t.focusedKey):(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,t.focusedKey)),j!=null&&(O.preventDefault(),$(j,T==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var q,re,oe;let j=(q=n.getKeyRightOf)===null||q===void 0?void 0:q.call(n,t.focusedKey);j==null&&s&&(j=T==="rtl"?(re=n.getLastKey)===null||re===void 0?void 0:re.call(n,t.focusedKey):(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),j!=null&&(O.preventDefault(),$(j,T==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){O.preventDefault();let j=n.getFirstKey(t.focusedKey,Er(O));t.setFocusedKey(j),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(j):p&&t.replaceSelection(j)}break;case"End":if(n.getLastKey){O.preventDefault();let j=n.getLastKey(t.focusedKey,Er(O));t.setFocusedKey(j),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(j):p&&t.replaceSelection(j)}break;case"PageDown":if(n.getKeyPageBelow){let j=n.getKeyPageBelow(t.focusedKey);j!=null&&(O.preventDefault(),$(j))}break;case"PageUp":if(n.getKeyPageAbove){let j=n.getKeyPageAbove(t.focusedKey);j!=null&&(O.preventDefault(),$(j))}break;case"a":Er(O)&&t.selectionMode==="multiple"&&c!==!0&&(O.preventDefault(),t.selectAll());break;case"Escape":!l&&t.selectedKeys.size!==0&&(O.stopPropagation(),O.preventDefault(),t.clearSelection());break;case"Tab":if(!u){if(O.shiftKey)r.current.focus();else{let j=Xm(r.current,{tabbable:!0}),B,z;do z=j.lastChild(),z&&(B=z);while(z);B&&!B.contains(document.activeElement)&&nn(B)}break}}},N=x.useRef({top:0,left:0});Mm(S,"scroll",h?null:()=>{N.current={top:S.current.scrollTop,left:S.current.scrollLeft}});let M=O=>{if(t.isFocused){O.currentTarget.contains(O.target)||t.setFocused(!1);return}if(O.currentTarget.contains(O.target)){if(t.setFocused(!0),t.focusedKey==null){let L=A=>{A!=null&&(t.setFocusedKey(A),p&&t.replaceSelection(A))},Z=O.relatedTarget;var $,J;Z&&O.currentTarget.compareDocumentPosition(Z)&Node.DOCUMENT_POSITION_FOLLOWING?L(($=t.lastSelectedKey)!==null&&$!==void 0?$:n.getLastKey()):L((J=t.firstSelectedKey)!==null&&J!==void 0?J:n.getFirstKey())}else h||(S.current.scrollTop=N.current.top,S.current.scrollLeft=N.current.left);if(t.focusedKey!=null){let L=S.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);L&&(L.contains(document.activeElement)||nn(L),sl()==="keyboard"&&Om(L,{containingElement:r.current}))}}},I=O=>{O.currentTarget.contains(O.relatedTarget)||t.setFocused(!1)};const k=x.useRef(a);x.useEffect(()=>{if(k.current){let O=null;a==="first"&&(O=n.getFirstKey()),a==="last"&&(O=n.getLastKey());let $=t.selectedKeys;if($.size){for(let J of $)if(t.canSelectItem(J)){O=J;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!f&&il(r.current)}},[]);let V=x.useRef(t.focusedKey);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==V.current||k.current)&&(S!=null&&S.current)){let O=sl(),$=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!$)return;(O==="keyboard"||k.current)&&(_m(S.current,$),O!=="virtual"&&Om($,{containingElement:r.current}))}!f&&t.isFocused&&t.focusedKey==null&&V.current!=null&&il(r.current),V.current=t.focusedKey,k.current=!1}),Mm(r,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let R={onKeyDown:E,onFocus:M,onBlur:I,onMouseDown(O){S.current===O.target&&O.preventDefault()}},{typeSelectProps:w}=NC({keyboardDelegate:n,selectionManager:t});m||(R=Nn(w,R));let P;return f||(P=t.focusedKey==null?0:-1),{collectionProps:{...R,tabIndex:P}}}function tD(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:a,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:m,linkBehavior:f="action"}=e,u=qi(),h=Y=>{if(Y.pointerType==="keyboard"&&Qi(Y))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(f==="selection"){let U=t.getItemProps(n);u.open(r.current,Y,U.href,U.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(f==="override"||f==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):Y&&Y.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||Y&&(Er(Y)||Y.pointerType==="touch"||Y.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};x.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!s&&(l?l():document.activeElement!==r.current&&il(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),c=c||t.isDisabled(n);let S={};!s&&!c?S={tabIndex:n===t.focusedKey?0:-1,onFocus(Y){Y.target===r.current&&t.setFocusedKey(n)}}:c&&(S.onMouseDown=Y=>{Y.preventDefault()});let y=t.isLink(n)&&f==="override",T=t.isLink(n)&&f!=="selection"&&f!=="none",C=!c&&t.canSelectItem(n)&&!y,E=(p||T)&&!c,N=E&&(t.selectionBehavior==="replace"?!C:!C||t.isEmpty),M=E&&C&&t.selectionBehavior==="replace",I=N||M,k=x.useRef(null),V=I&&C,R=x.useRef(!1),w=x.useRef(!1),P=Y=>{if(p&&p(),T){let U=t.getItemProps(n);u.open(r.current,Y,U.href,U.routerOptions)}},O={};a?(O.onPressStart=Y=>{k.current=Y.pointerType,R.current=V,Y.pointerType==="keyboard"&&(!I||of())&&h(Y)},m?(O.onPressUp=N?null:Y=>{Y.pointerType!=="keyboard"&&C&&h(Y)},O.onPress=N?P:null):O.onPress=Y=>{if(N||M&&Y.pointerType!=="mouse"){if(Y.pointerType==="keyboard"&&!rf())return;P(Y)}else Y.pointerType!=="keyboard"&&C&&h(Y)}):(O.onPressStart=Y=>{k.current=Y.pointerType,R.current=V,w.current=N,C&&(Y.pointerType==="mouse"&&!N||Y.pointerType==="keyboard"&&(!E||of()))&&h(Y)},O.onPress=Y=>{(Y.pointerType==="touch"||Y.pointerType==="pen"||Y.pointerType==="virtual"||Y.pointerType==="keyboard"&&I&&rf()||Y.pointerType==="mouse"&&w.current)&&(I?P(Y):C&&h(Y))}),S["data-key"]=n,O.preventFocusOnPress=s;let{pressProps:$,isPressed:J}=$m(O),L=M?Y=>{k.current==="mouse"&&(Y.stopPropagation(),Y.preventDefault(),P(Y))}:void 0,{longPressProps:Z}=HC({isDisabled:!V,onLongPress(Y){Y.pointerType==="touch"&&(h(Y),t.setSelectionBehavior("toggle"))}}),A=Y=>{k.current==="touch"&&R.current&&Y.preventDefault()},ne=t.isLink(n)?Y=>{Zn.isOpening||Y.preventDefault()}:void 0;return{itemProps:Nn(S,C||N?$:{},V?Z:{},{onDoubleClick:L,onDragStartCapture:A,onClick:ne}),isPressed:J,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:C,hasAction:I}}function rf(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function of(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}function nD(e,t,n){let{key:r,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:l,selectedKey:c}=t,p=r===c,m=a||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:f,isPressed:u}=tD({selectionManager:l,key:r,ref:n,isDisabled:m,shouldSelectOnPressUp:s,linkBehavior:"selection"}),h=da(t,r,"tab"),S=da(t,r,"tabpanel"),{tabIndex:y}=f,T=t.collection.getItem(r),C=sC(T==null?void 0:T.props,{labelable:!0});delete C.id;let E=bC(T==null?void 0:T.props);return{tabProps:Nn(C,E,f,{id:h,"aria-selected":p,"aria-disabled":m||void 0,"aria-controls":p?S:void 0,tabIndex:m?void 0:y,role:"tab"}),isSelected:p,isDisabled:m,isPressed:u}}function rD(e,t,n){let r=zC(n)?void 0:0;var a;const s=da(t,(a=e.id)!==null&&a!==void 0?a:t==null?void 0:t.selectedKey,"tabpanel"),l=xm({...e,id:s,"aria-labelledby":da(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:Nn(l,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class oD{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}isDisabled(t){var n,r;return this.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.isDisabled(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.isDisabled(t)&&(t=this.getPreviousKey(t)),t}getKeyAbove(t){return this.tabDirection?null:this.getPreviousKey(t)}getKeyBelow(t){return this.tabDirection?null:this.getNextKey(t)}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.isDisabled(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.isDisabled(t));return t}constructor(t,n,r,a=new Set){this.collection=t,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=a,this.tabDirection=r==="horizontal"}}function aD(e,t,n){let{orientation:r="horizontal",keyboardActivation:a="automatic"}=e,{collection:s,selectionManager:l,disabledKeys:c}=t,{direction:p}=nf(),m=x.useMemo(()=>new oD(s,p,r,c),[s,c,r,p]),{collectionProps:f}=eD({ref:n,selectionManager:l,keyboardDelegate:m,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=Tm();bm.set(t,u);let h=xm({...e,id:u});return{tabListProps:{...Nn(f,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function af({item:e,state:t}){const{key:n}=e,r=o.useRef(null),{tabProps:a}=nD({key:n},t,r),s=t.selectedKey===n,l=t.disabledKeys.has(n);return o.createElement("div",{...a,ref:r,className:G("sps-nav__item","sps-nav__link",s&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function sf({state:e,...t}){const n=o.useRef(null),{tabPanelProps:r}=rD(t,e,n);return o.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class lf{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return(n==null?void 0:n.childNodes)||[]}constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let c of l.childNodes)n(c)};for(let l of t)n(l);let r=null,a=0;for(let[l,c]of this.keyMap)r?(r.nextKey=l,c.prevKey=r.key):(this.firstKey=l,c.prevKey=void 0),c.type==="item"&&(c.index=a++),r=c,r.nextKey=void 0;var s;this.lastKey=(s=r==null?void 0:r.key)!==null&&s!==void 0?s:null}}class Kt extends Set{constructor(t,n,r){super(t),t instanceof Kt?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function sD(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function iD(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:a="toggle",disabledBehavior:s="all"}=e,l=x.useRef(!1),[,c]=x.useState(!1),p=x.useRef(null),m=x.useRef(null),[,f]=x.useState(null),u=x.useMemo(()=>cf(e.selectedKeys),[e.selectedKeys]),h=x.useMemo(()=>cf(e.defaultSelectedKeys,new Kt),[e.defaultSelectedKeys]),[S,y]=Pm(u,h,e.onSelectionChange),T=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[C,E]=x.useState(a);a==="replace"&&C==="toggle"&&typeof S=="object"&&S.size===0&&E("replace");let N=x.useRef(a);return x.useEffect(()=>{a!==N.current&&(E(a),N.current=a)},[a]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:C,setSelectionBehavior:E,get isFocused(){return l.current},setFocused(M){l.current=M,c(M)},get focusedKey(){return p.current},get childFocusStrategy(){return m.current},setFocusedKey(M,I="first"){p.current=M,m.current=I,f(M)},selectedKeys:S,setSelectedKeys(M){(r||!sD(M,S))&&y(M)},disabledKeys:T,disabledBehavior:s}}function cf(e,t){return e?e==="all"?"all":new Kt(e):t}class lD{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){return this.state.selectionMode==="none"?!1:(t=this.getKey(t),this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&or.compareNodeOrder(this.collection,r,t)<0)&&(t=r)}return t==null?void 0:t.key}get lastSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&or.compareNodeOrder(this.collection,r,t)>0)&&(t=r)}return t==null?void 0:t.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new Kt([t],t,t);else{let s=this.state.selectedKeys;var r;let l=(r=s.anchorKey)!==null&&r!==void 0?r:t;n=new Kt(s,l,t);var a;for(let c of this.getKeyRange(l,(a=s.currentKey)!==null&&a!==void 0?a:t))n.delete(c);for(let c of this.getKeyRange(t,l))this.canSelectItem(c)&&n.add(c)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),a=this.collection.getItem(n);return r&&a?or.compareNodeOrder(this.collection,r,a)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let a=[],s=t;for(;s!=null;){let l=this.collection.getItem(s);if((l&&l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&a.push(s),s===n)return a;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}if(t=this.getKey(t),t==null)return;let n=new Kt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none"||(t=this.getKey(t),t==null))return;let n=this.canSelectItem(t)?new Kt([t],t,t):new Kt;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Kt;for(let r of t)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){let a=this.collection.getItem(r);a.type==="item"&&t.push(r),a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n(or.getFirstItem(or.getChildNodes(a,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Kt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}constructor(t,n,r){this.collection=t,this.state=n;var a;this.allowsCellSelection=(a=r==null?void 0:r.allowsCellSelection)!==null&&a!==void 0?a:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function cD(e){let{filter:t,layoutDelegate:n}=e,r=iD(e),a=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=x.useCallback(f=>t?new lf(t(f)):new lf(f),[t]),l=x.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=or.useCollection(e,s,l),p=x.useMemo(()=>new lD(c,r,{layoutDelegate:n}),[c,r,n]);const m=x.useRef(null);return x.useEffect(()=>{if(r.focusedKey!=null&&!c.getItem(r.focusedKey)&&m.current){const E=m.current.getItem(r.focusedKey),N=[...m.current.getKeys()].map(w=>{const P=m.current.getItem(w);return(P==null?void 0:P.type)==="item"?P:null}).filter(w=>w!==null),M=[...c.getKeys()].map(w=>{const P=c.getItem(w);return(P==null?void 0:P.type)==="item"?P:null}).filter(w=>w!==null);var f,u;const I=((f=N==null?void 0:N.length)!==null&&f!==void 0?f:0)-((u=M==null?void 0:M.length)!==null&&u!==void 0?u:0);var h,S,y;let k=Math.min(I>1?Math.max(((h=E==null?void 0:E.index)!==null&&h!==void 0?h:0)-I+1,0):(S=E==null?void 0:E.index)!==null&&S!==void 0?S:0,((y=M==null?void 0:M.length)!==null&&y!==void 0?y:0)-1),V=null,R=!1;for(;k>=0;){if(!p.isDisabled(M[k].key)){V=M[k];break}if(k<M.length-1&&!R)k++;else{R=!0;var T,C;k>((T=E==null?void 0:E.index)!==null&&T!==void 0?T:0)&&(k=(C=E==null?void 0:E.index)!==null&&C!==void 0?C:0),k--}}r.setFocusedKey(V?V.key:null)}m.current=c},[c,p,r,r.focusedKey]),{collection:c,disabledKeys:a,selectionManager:p}}function dD(e){var t;let[n,r]=Pm(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),a=x.useMemo(()=>n!=null?[n]:[],[n]),{collection:s,disabledKeys:l,selectionManager:c}=cD({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:m=>{if(m==="all")return;var f;let u=(f=m.values().next().value)!==null&&f!==void 0?f:null;u===n&&e.onSelectionChange&&e.onSelectionChange(u),r(u)}}),p=n!=null?s.getItem(n):null;return{collection:s,disabledKeys:l,selectionManager:c,selectedKey:n,setSelectedKey:r,selectedItem:p}}function pD(e){var t;let n=dD({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:df(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:r,collection:a,selectedKey:s}=n,l=x.useRef(s);return x.useEffect(()=>{let c=s;(r.isEmpty||!a.getItem(c))&&(c=df(a,n.disabledKeys),c!=null&&r.setSelectedKeys([c])),(c!=null&&r.focusedKey==null||!r.isFocused&&c!==l.current)&&r.setFocusedKey(c),l.current=c}),{...n,isDisabled:e.isDisabled||!1}}function df(e,t){let n=null;if(e){var r,a,s,l;for(n=e.getFirstKey();(t.has(n)||!((a=e.getItem(n))===null||a===void 0||(r=a.props)===null||r===void 0)&&r.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);(t.has(n)||!((l=e.getItem(n))===null||l===void 0||(s=l.props)===null||s===void 0)&&s.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}const uD={},mD={};function pl(e){const t=pD(e),n=o.useRef(null),{tabListProps:r}=aD(e,t,n);return o.createElement(o.Fragment,null,o.createElement("div",{...r,ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"},[...t.collection].map(a=>o.createElement(af,{key:a.key,item:a,state:t}))),o.createElement(sf,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(pl,{props:uD,propTypes:mD,displayName:"SpsTabsV2"});const fD={};function ul({children:e,className:t,...n}){return o.createElement("div",{className:G("sps-card__footer",t),...n},e)}Object.assign(ul,{props:fD,displayName:"SpsCardV2Footer"});const hD={};function ml({children:e,className:t,...n}){return o.createElement("div",{className:G("sps-card__header",t),...n},e)}Object.assign(ml,{props:hD,displayName:"SpsCardV2Header"});const SD={};function pf({children:e,className:t,...n}){const[r,a,s,l,c]=It(e,[{type:ml},{type:pl},{type:Ih.Tabs},{type:ul}]),p=a.length>0?a:s;return o.createElement("div",{className:G("sps-card",t),...n},r,p.length>0?p:o.createElement("div",{className:"sps-card__body"},c),l)}Object.assign(pf,{props:SD,displayName:"SpsCardV2"});const gD={};function uf({children:e,className:t,...n}){return o.createElement("div",{className:G("sps-card__title",t),...n},e)}Object.assign(uf,{props:gD,displayName:"SpsCardV2Title"});const bD={...Hp,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function mf(e){const{children:t,className:n,controlsDisabled:r,footerLinks:a,formArray:s,formGroup:l,formMeta:c,isOpen:p,onClear:m,onSubmit:f,unsafelyReplaceClassName:u,...h}=e,{t:S}=o.useContext(He);function y(){m&&m()}const T=G(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return o.createElement("div",{className:T,...h},o.createElement(ro,{onSubmit:f,formArray:s,formGroup:l,formMeta:c},o.createElement("div",{className:"sps-advanced-search__form"},t),o.createElement("div",{className:"sps-advanced-search__footer"},a&&o.createElement("div",{id:"footer_links"},vt(a)),o.createElement("div",{className:"sps-advanced-search__footer-controls"},o.createElement(Ue,{kind:W.ButtonKind.DEFAULT,type:W.ButtonType.BUTTON,className:"mr-2",onClick:y,disabled:r},S("design-system:advancedSearch.clear")),o.createElement(Ue,{kind:W.ButtonKind.KEY,type:W.ButtonType.SUBMIT,disabled:r},S("design-system:advancedSearch.search"))))))}Object.assign(mf,{props:bD,displayName:"SpsAdvancedSearch"});const vD={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>o.createElement(o.Fragment,null,o.createElement("p",null,'Advanced Search is comprised of a panel of input fields, and a text button that exposes and hides the panel. By default, the Advanced Search panel is hidden (with the exception of "Advanced Search Only" scenarios).'),o.createElement("p",null,"Advanced Search works in conjunction with the"," ",o.createElement(e,{to:"list-toolbar"},"List Bar")," and"," ",o.createElement(e,{to:"search-results-bar"},"Search Results")," components. Refer to those pages for additional details."),o.createElement("p",null,"Use the following guidelines when including Advanced Search on your page:",o.createElement("ul",null,o.createElement("li",null,"The Advanced Search Panel can contain any number of input fields."),o.createElement("li",null,"The Advanced Search Panel can place input fields in any unique layout to best serve the needs of the search criteria, but must adhere to the rules of the"," ",o.createElement(t,{to:"/style-and-layout/grid/"},"SPS Grid")," and guidelines for"," ",o.createElement(e,{to:"form"},"Form Layouts"),"."))))},basic:{label:"Basic Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("p",null,"A Basic Advanced Search consists of the List Bar with a search input and an Advanced Search text button. For more details on additional button and component options in the List Bar reference the ",o.createElement(e,{to:"list-toolbar"},"List Bar")," page.")),examples:{basic:{react:v.code`
|
|
9141
9141
|
import {
|
|
9142
9142
|
SpsListToolbar,
|
|
9143
9143
|
SpsListToolbarSearch,
|
|
@@ -11441,4 +11441,4 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
11441
11441
|
</SpsCard>
|
|
11442
11442
|
</div>
|
|
11443
11443
|
</div>
|
|
11444
|
-
`}}}};_.AsTypingErrorKeys=sr,_.ContentOrderExample=wf,_.DEFAULT_DATETIME_PRESETS=au,_.DEFAULT_PRESETS=ui,_.DragDropContext=kp,_.Draggable=Vp,_.Droppable=ai,_.FauxChangeEvent=gn,_.I18nContext=He,_.MANIFEST=Ww,_.ModalAction=Cf,_.OnBlurErrorKeys=Et,_.OnSubmitErrorKeys=
|
|
11444
|
+
`}}}};_.AsTypingErrorKeys=sr,_.ContentOrderExample=wf,_.DEFAULT_DATETIME_PRESETS=au,_.DEFAULT_PRESETS=ui,_.DragDropContext=kp,_.Draggable=Vp,_.Droppable=ai,_.FauxChangeEvent=gn,_.I18nContext=He,_.MANIFEST=Ww,_.ModalAction=Cf,_.OnBlurErrorKeys=Et,_.OnSubmitErrorKeys=yo,_.PortalContext=kt,_.PreventativeErrorKeys=zt,_.Provide=dc,_.SimpleDateUtils=te,_.SpsAddRemoveFormRowExamples=ME,_.SpsAdvancedSearch=mf,_.SpsAdvancedSearchExamples=vD,_.SpsApp=vS,_.SpsAutocomplete=Jt,_.SpsAutocompleteExamples=fc,_.SpsButton=Ue,_.SpsButtonExamples=pw,_.SpsButtonGroup=Ru,_.SpsCard=ii,_.SpsCardTabbedPane=si,_.SpsCardV2=pf,_.SpsCardV2Footer=ul,_.SpsCardV2Header=ml,_.SpsCardV2Title=uf,_.SpsCheckbox=Fn,_.SpsCheckboxDropdown=gi,_.SpsCheckboxExamples=hc,_.SpsClickableTag=Ar,_.SpsClickableTagExamples=Sc,_.SpsColumnChooser=ci,_.SpsColumnChooserColumn=zo,_.SpsColumnChooserExamples=Gp,_.SpsConditionalField=Wi,_.SpsConditionalFieldExamples=mm,_.SpsContentRow=di,_.SpsContentRowCol=Gn,_.SpsContentRowExamples=Yp,_.SpsContentRowExpansion=jo,_.SpsContextBar=yD,_.SpsCurrencyInput=ff,_.SpsCurrencyInputExamples=CD,_.SpsDateRangePicker=mi,_.SpsDateRangePickerExamples=tu,_.SpsDateTime=Si,_.SpsDateTimeRangePicker=fi,_.SpsDateTimeRangePickerExamples=su,_.SpsDatepicker=pi,_.SpsDatepickerExamples=Xp,_.SpsDatetimeExamples=lu,_.SpsDd=uu,_.SpsDescriptionList=Zo,_.SpsDescriptionListDefinition=Xo,_.SpsDescriptionListExamples=Su,_.SpsDescriptionListTerm=ea,_.SpsDl=du,_.SpsDropdown=zn,_.SpsDropdownExamples=gu,_.SpsDt=hu,_.SpsFeedbackBlock=Fi,_.SpsFeedbackBlockExamples=Pw,_.SpsFieldset=bi,_.SpsFieldsetExamples=bu,_.SpsFilterPanel=Vi,_.SpsFilterPanelCap=Ki,_.SpsFilterPanelExamples=um,_.SpsFilterPanelFilterBox=Hi,_.SpsFilterPanelSection=$i,_.SpsFilterTile=Rf,_.SpsFilterTileList=Bf,_.SpsFilterTileListExamples=fN,_.SpsFocusedTask=hl,_.SpsFocusedTaskActions=fl,_.SpsFocusedTaskExamples=kD,_.SpsForm=ro,_.SpsFormArrayMeta=tc,_.SpsFormComponentWrapper=at,_.SpsFormExamples=Wp,_.SpsFormFieldMeta=Or,_.SpsFormGroupMeta=ec,_.SpsFormMetaBase=Rn,_.SpsFormSetMeta=Bn,_.SpsGrowler=Sl,_.SpsGrowlerExamples=MD,_.SpsI=Vt,_.SpsIconButtonPanel=Bu,_.SpsIncrementor=vi,_.SpsIncrementorExamples=vu,_.SpsInputGroup=br,_.SpsInsightTile=hf,_.SpsInsights=_D,_.SpsKeyValueList=Sf,_.SpsKeyValueListItem=gf,_.SpsKeyValueTag=bf,_.SpsKeyValueTagExamples=BD,_.SpsLabel=yi,_.SpsLabelExamples=yu,_.SpsListActionBar=Ti,_.SpsListActionBarExamples=Fu,_.SpsListToolbar=Tf,_.SpsListToolbarExamples=GD,_.SpsListToolbarSearch=bl,_.SpsListToolbarSearchInfo=vl,_.SpsListToolbarSortBy=Ef,_.SpsMicroBlock=Ei,_.SpsMicroBlockExamples=Vu,_.SpsMicroZeroState=Vf,_.SpsModal=wi,_.SpsModalExamples=Ku,_.SpsModalFooter=na,_.SpsMultiSelect=Di,_.SpsMultiSelectExamples=Hu,_.SpsMultiValueTextInput=Gi,_.SpsMultiValueTextInputExamples=hm,_.SpsPageSelector=ra,_.SpsPageSubtitle=Nf,_.SpsPageTitle=Df,_.SpsPageTitleExamples=qD,_.SpsPagination=Ni,_.SpsPaginationExamples=Wu,_.SpsProductBar=kf,_.SpsProductBarExamples=XD,_.SpsProductBarTab=yl,_.SpsProgressBar=If,_.SpsProgressBarExamples=eN,_.SpsProgressRing=Ri,_.SpsRadioButton=ki,_.SpsRadioButtonExamples=Gu,_.SpsScrollableContainer=xf,_.SpsSearchResultsBar=yf,_.SpsSearchResultsBarExamples=VD,_.SpsSearchResultsBarV2=gl,_.SpsSelect=Yn,_.SpsSelectExamples=nu,_.SpsSideNav=Uu,_.SpsSideNavExamples=zu,_.SpsSlackLink=Mf,_.SpsSlackLinkExamples=rN,_.SpsSlideInPanel=Ci,_.SpsSlideInPanelExamples=$u,_.SpsSortingHeader=_f,_.SpsSortingHeaderCell=Tl,_.SpsSortingHeaderExamples=sN,_.SpsSpinner=Ha,_.SpsSplitButton=Ii,_.SpsSplitButtonExamples=ju,_.SpsSteppedProgressBar=Lf,_.SpsSteppedProgressBarExamples=lN,_.SpsSummaryListColumn=Mi,_.SpsSummaryListExamples=qu,_.SpsSummaryListExpansion=ao,_.SpsSummaryListRow=xi,_.SpsTab=af,_.SpsTabPanel=sf,_.SpsTable=jn,_.SpsTableBody=Cn,_.SpsTableCell=pe,_.SpsTableExamples=Au,_.SpsTableHead=wn,_.SpsTableHeader=ot,_.SpsTableRow=Ge,_.SpsTabsV2=pl,_.SpsTag=Ft,_.SpsTagExamples=fw,_.SpsTaskQueue=_i,_.SpsTaskQueueExamples=Ju,_.SpsTbody=Lu,_.SpsTd=Pu,_.SpsTextInput=aa,_.SpsTextInputExamples=Zu,_.SpsTextarea=Li,_.SpsTextareaExamples=Xu,_.SpsTh=Nu,_.SpsThead=Iu,_.SpsTile=Of,_.SpsTileList=Pf,_.SpsTileListExamples=pN,_.SpsTimeInput=Yi,_.SpsTimeInputExamples=gm,_.SpsToggle=Oi,_.SpsToggleExamples=em,_.SpsTooltip=Lt,_.SpsTooltipExamples=tm,_.SpsTooltipTitle=Pi,_.SpsTr=Mu,_.SpsValidators=Eo,_.SpsVerticalRule=El,_.SpsVr=Ff,_.SpsWf=rm,_.SpsWfDoc=sm,_.SpsWfDs=lm,_.SpsWfStep=dm,_.SpsWizardExamples=om,_.SpsWizardSidebar=Bi,_.SpsWizardSubstep=Ai,_.SpsWorkflow=sa,_.SpsWorkflowDocument=ia,_.SpsWorkflowDocumentStatus=la,_.SpsWorkflowExamples=pm,_.SpsWorkflowStep=ca,_.SpsZeroState=$f,_.SpsZeroStateExamples=gN,_.TooltipVisibility=_e,_.ValidationMode=jt,_.addOnChangeErrorKey=ql,_.addOnSubmitErrorKey=Jl,_.bindProps=bS,_.contentOf=vt,_.date=Lr,_.dateConstraint=Ql,_.dateRange=Xl,_.findParentBranches=oa,_.flipPosition=Wa,_.formArray=DE,_.formControl=NE,_.formGroup=kE,_.getMember=li,_.getPosition=An,_.letterAndNumberKeys=Ga,_.resetServerContext=CT,_.selectChildren=It,_.setDateFormat=Zl,_.toggleTooltipState=Qo,_.useCheckDeprecatedProps=pc,_.useColumnCellResizer=Cu,_.useColumnHeaderResizer=wu,_.useCustomValidator=aS,_.useDidUpdateEffect=Ya,_.useDocumentEventListener=Ua,_.useElementId=Sn,_.useForm=IE,_.useGrowlers=xD,_.useInputPopup=dr,_.useKeyboardSensor=Tp,_.useModals=YD,_.useMouseSensor=yp,_.usePatchReducer=qt,_.usePortal=cr,_.useServerSideValidation=xE,_.useSpsAction=UD,_.useSpsForm=nc,_.useTouchSensor=Ep,_.validate=wo,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|